Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Example: date-and-time picture strings

These are examples of picture strings that are recognized by the date and time services.

Table 79. Examples of date-and-time picture strings
Picture strings Examples Comments
YYMMDD
YYYYMMDD
880516
19880516
 
 
YYYY-MM-DD 1988-05-16 1988-5-16 would also be valid input.
<JJJJ> YY.MM.DD Showa 63.05.16 Showa is a Japanese Era name. Showa 63 equals 1988.
MMDDYY
MM/DD/YY
ZM/ZD/YY
MM/DD/YYYY
MM/DD/Y
050688
05/06/88
5/6/88
05/06/1988
05/06/8
 
 
 
 
One-digit year format (Y) is valid for output only.
DD.MM.YY
DD-RRRR-YY
DD MMM YY
DD Mmmmmmmmmm YY
ZD Mmmmmmmmmz YY
Mmmmmmmmmz ZD, YYYY
ZDMMMMMMMMzYY
09.06.88
09-VI -88
09 JUN 88
09 June 88
9 June 88
June 9, 1988
9JUNE88
 
 
 
 
 
 
Z suppresses zeros and blanks.
YY.DDD
YYDDD
YYYY/DDD
88.137
88137
1988/137
Julian date
YYMMDDHHMISS
YYYYMMDDHHMISS
YYYY-MM-DD HH:MI:SS.999
WWW, ZM/ZD/YY HH:MI AP
Wwwwwwwwwz, DD Mmm YYYY, ZH:MI AP
880516204229
19880516204229
1988-05-16 20:42:29.046
MON, 5/16/88 08:42 PM
Monday, 16 May 1988, 8:42 PM
Timestamp—valid only for CEESECS and CEEDATM. If used with CEEDATE, time positions are filled with zeros. If used with CEEDAYS, HH, MI, SS, and 999 fields are ignored.
Note: Lowercase characters can be used only for alphabetic picture terms.

Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)