905-FORMAT-DATE

The 905-FORMAT-DATE routine formats a date according to the user's locale. This routine can be useful to format dates in messages since the formatting of dates in messages is not done as part of the formatting of other screen elements.

Library CALRTNS

Required Input

Field Type and length Definition
WSDR-FR-DATE N 8 Date to convert (in yyyymmdd format)
CRT-LOCALE A 30 The user's locale.

Output

Field Type and length Definition
WSDR-FORMATTED-DATE A 51 The date formatted according to the user's locale—for example, if the WSDR-FR-DATE is 20031231 and the locale is US English, the output is 12/31/2003.
WSDR-ERROR-NBR N 9

Error number.

24 = Bad Date in WSDR-FR-DATE

WSDR-ERROR-VAR A 20 Input parameter is in error.