CONV_DATE

Use the CONV_DATE script function to convert a date from one date format to another. For more information, see Date, Time and Period Formats in Scripts. Assign the value that the script function returns to a script variable for further processing.

Syntax

CONV_DATE ([CurrentDateFormat:] Date [, NewDateFormat])

Parameters

Examples

These examples convert a date from one date format to another, and print the result in the activation report.

In the following example, the specified date is in a different format than YYMMDD or YYYYMMDD, so the script specifies the current format. The script also specifies the new date format.

:SET &QUALIFYINGDATE# = CONV_DATE("DDMMYY:311299", "DD.MM.YYYY")

:PRINT &QUALIFYINGDATE#

Line in the activation report:

2019-03-28 10:12:47 - U00020408 31.12.1999

In the following example, the specified date is in YYMMDD format, so the script does not need to specify the current format. The script just specifies the new date format.

:SET &QUALIFYINGDATE# = CONV_DATE("991231", "DD-MM-YYYY")

:PRINT &QUALIFYINGDATE#

Line in the activation report:

2019-03-28 10:15:09 - U00020408 31-12-1999

In the following example, the script does not specify the new format, so the date is returned in the default YYMMDD format.

:SET &QUALIFYINGDATE# = CONV_DATE("DDMMYY:311299")

:PRINT &QUALIFYINGDATE#

Line in the activation report:

2019-03-28 10:17:59 - U00020408 991231

See also:

seealso

Script Date and Time Functions

Date, Time and Period Formats in Scripts