Xbasic
A5_CONVERT_DATETIME_STRING Function
Syntax
Output_Date_Time as C = a5_convert_datetime_string(C dateTimeString ,C InDateFormat ,C OutDateFormat [,C separator ])
Arguments
- dateTimeStringCharacter
The original data string, containing values for year, month, day, hours, and minutes.
- InDateFormatCharacter
A character string containing the letters "Y", "M", and "D" that indicates the sequence of input values.
- OutDateFormatCharacter
A character string containing the letters "Y", "M", and "D" that indicates the sequence of output values.
- separatorCharacter
The character(s) to place between the year, month, and day values.
Returns
- Output_Date_TimeCharacter
The reformatted date time string.
Description
The A5_CONVERT_DATETIME_STRING() function reformats a date portion of a date time string, by converting a datetime string from one format to another. E.g. from DMY format to YMD format.
Example
? a5_convert_datetime_string("12/31/05 4:12pm", "MDY", "YMD", "-") = "05/12/31 4:12pm"
See Also