CONV_DATE
Script Function: Converts a date from one date format to another.
Syntax
CONV_DATE ([OldDateFormat:] Date [, NewDateFormat])
Syntax |
Description/Format |
---|---|
OldDateFormat |
Old Format for the specified Date. |
Date |
|
NewDateFormat |
New Format for the specified Date. |
Return code |
---|
Date in the new format |
Comments
This script function converts the date format from Date to NewDateFormat.
The old and new date formats are optional parameters. They may be used to specify a particular format to be kept or required.
If you decide not to use the old date format, the date must either be specified in the format "YYMMDD" or "YYYYMMDD". If NewDateFormat has not been used, the default format "YYMMDD" will be returned. Use a colon or semi colon as a separator between the old date format and Date.
Examples
In the example shown below, a date is converted from one date format to another. The returned value is stored in a script variable. OldDateFormat and NewDateFormat are not specified. The returned values are "31.12.1999", "31-12-1999" and "991231".
:SET &QUALIFYINGDATE# = CONV_DATE("DDMMYY:311299", "DD.MM.YYYY")
:SET &QUALIFYINGDATE# =
CONV_DATE("991231", "DD-MM-YYYY")
:SET &QUALIFYINGDATE# =
CONV_DATE("DDMMYY:311299")
See also:
Script element | Description |
---|---|
Converts date and time for use in another time zone. |
Script Elements - Date and Time
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function