Convert Seconds to Character Timestamp (CEEDATM) API


  Required Parameter Group:

1 input_seconds Input FLOAT8
2 picture_string Input VSTRING
3 output_timestamp Output VSTRING

  Omissible Parameter:

4 fc Output FEEDBACK

  Service Program Name: QLEAWI

  Default Public Authority: *USE

  Threadsafe: Yes

The Convert Seconds to Character Timestamp (CEEDATM) API formats a number representing the number of seconds since 00:00:00 14 October 1582. The output is a character string such as 1988/07/26 20:37:00.

Authorities and Locks

None.


Required Parameter Group

input_seconds (input)
A 64-bit double floating-point number representing the number of seconds since 00:00:00 on 14 October 1582. For example, 00:00:01 on 15 October 1582 is second number 86,401 (24*60*60 + 01). The valid range is 86 400 to 265 621 679 999.999 (23:59:59.999 31 December 9999).

picture_string (input by descriptor)
A character string representing the desired format of output_timestamp, for example MM/DD/YY HH:MM AP. Each character in picture_string represents a character in output_timestamp. 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 contains a list of valid picture characters, and Examples of Picture Strings Recognized by ILE Date and Time APIs has examples of valid picture strings.

If picture_string is null or blank, CEEDATM 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-time format is MM/DD/YYYY HH:MI AP. If the current job value for CNTRYID is FR (France), the date-time format is YYYY-MM-DD HH.MI.

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

output_timestamp (output by descriptor)
A character string that is the result of converting input_seconds to the format specified by picture_string. If necessary, output is truncated to the length of output_timestamp. Sample Output of the CEEDATM API shows sample output. If input_seconds is not valid, output_timestamp is set to all blanks and CEEDATM 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

CEE0000 The API completed successfully
Severity: 00  
CEE0501 The operational descriptor data type is not valid
Severity: 30  
CEE0502 Missing operational descriptor
Severity: 30  
CEE2505 The value for seconds is out of range
Severity: 30  
CEE2506 The value for seconds is outside of era
Severity: 30  
CEE2518 The picture string specification is not valid
Severity: 30  
CEE2527 Timestamp truncated
Severity: 30  
CEE9902 Unexpected user error occurred in &1
Severity: 30  

Usage Notes


Sample Output of the CEEDATM API

input_seconds picture_string output_timestamp
12 799 191 601.000
YYMMDD
HH:MI:SS
YY-MM-DD
YYMMDDHHMISS
YY-MM-DD HH:MI:SS
YYYY-MM-DD HH:MI:SS AP
880516
19:00:01
88-05-16
880516190001
88-05-16 19:00:01
1988-05-16 07:00:01 PM
12 799 191 661.986
DD Mmm YY
DD MMM YY HH:MM
WWW, MMM DD, YYYY ZH:MI AP
Wwwwwwwwwz, ZM/ZD/YY HH:MI:SS.99
16 May 88
16 MAY 88 19:01
MON, MAY 16, 1988 7:01 PM
Monday, 5/16/88 19:01:01.98
12 799 191 662.009
YYYY
YY
Y
MM
ZM
RRRR
MMM
Mmm
Mmmmmmmmmm
Mmmmmmmmmz
DD
ZD
DDD
HH
ZH
MI
SS
99
999
AP
WWW
Www
Wwwwwwwwww
Wwwwwwwwwz
1988
88
8
05
5
V   
MAY
May
May      
May
16
16
137
19
19
01
02
00
009
PM
MON
Mon
Monday    
Monday


Example

See Code disclaimer information for information pertaining to code examples.



API introduced: V2R3
Top | ILE CEE APIs | APIs by category