ConvertDate
Converts the date (string) from defined format to an other defined format.
ConvertDate(date, format1, format2)
Parameters
- date : String, the date
- format1 : Inputformat of the date string, can be yyyymmdd, ddMMMyyyy,... (yyyy Year, mm Month, MMM Month (e.g. OCT), dd Day)
- format2 : Outputformat of the date string, can be yyyymmdd, ddMMMyyyy, yyyy, MMM, dd
Remarks
Example
// Declare a date
var theDate = "20021030";
//Declare the function ConvertDate
var func = "ConvertDate("+theDate+",yyyymmdd,ddMMyyyy)";
//Execute function and get the new dateformat
var newDate = ExecFunc(func);
// 20021030 is now 30OCT2002