Convert Lilian Date to Character Format (CEEDATE) API


  Required Parameter Group:


  Omissible Parameter:


  Service Program Name: QLEAWI

  Default Public Authority: *USE

  Threadsafe: Yes

The Convert Lilian Date to Character Format (CEEDATE) API formats a number representing a Lilian date. The output is a character string such as 1988/07/26.

Authorities and Locks

None.


Required Parameter Group

input_Lilian_date (input)
A 32-bit binary integer representing the Lilian date, which is the number of days since 14 October 1582. For example, 16 May 1988 is day number 148 138. Valid range is 1 to 3 074 324 (31 December 9999).

picture_string (input by descriptor)
A character string representing the desired format of output_char_date, for example MM/DD/YY. Each character in picture_string represents a character in output_char_date. If delimiters such as the slash (/) appear in the picture string, they are copied as is to output_char_date.

Picture Characters Used in Picture Strings has a list of valid picture characters, and Examples of Picture Strings Recognized by ILE Date and Time APIs contains examples of valid picture strings.

If picture_string is null or blank, CEEDATE obtains picture_string based on the current job value for the country or region ID (CNTRYID). For example, if the current job value for CNTRYID is US (United States), the date format is MM/DD/YYYY. If the current job value for CNTRYID is FR (France), the date format is DD.MM.YYYY.

This default mechanism makes it easy for translators to specify the preferred date format, and also easy for application programs and library procedures to automatically use this format.

output_char_date (output by descriptor)
A character string that is the result of converting input_Lilian_date to the format specified by picture_string. If necessary, output will be truncated to the length of output_char_date. Sample Output of the CEEDATE API contains sample output dates. If input_Lilian_date is not valid, output_char_date is set to all blanks and CEEDATE ends with a nonzero feedback-code.

Omissible Parameter

fc (output)
A 12-byte feedback code passed by reference. If specified as an argument, feedback information (a condition token) is returned to the calling procedure. If not specified and the requested operation was not successfully completed, the condition is signaled to the condition manager.

Feedback Codes and Conditions


Usage Notes


Sample Output of the CEEDATE API


Example

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.



API introduced: V2R3

[ Back to top | ILE CEE APIs | APIs by category ]