Date and time services tables
This appendix contains information to help you use Language Environment date and time callable services. Included are tables for picture term and national language era usage.
Picture terms | Explanations | Valid values | Note |
---|---|---|---|
Y |
1-digit year |
0-9 |
Y valid for output only. |
<JJJJ> | Japanese era name in DBCS characters | Heisei (X'0E458D45BA0F') |
Affects YY field: if <JJJJ> specified, YY means the year within Japanese era, for example, 1988 equals Showa 63. See example in Table 2. |
<CCCC> <CCCCCCCC> | Era name in DBCS characters | (X'0E4D8256CE0F') (X'0E4C845ADD4D8256CE0F') | Affects YY field: if <CCCC> specified, YY means the year within the era. See example in Table 2. |
MM ZM | 2-digit month 1- or 2-digit month | 01-12 1-12 | For output, leading zero suppressed. For input, ZM treated as MM. |
RRRR RRRZ | Roman numeral month | I␢␢␢-XII␢ (left-aligned) | For input, source string is folded to uppercase. For output, uppercase only. I=Jan, II=Feb, ..., XII=Dec. |
MMM |
3-char month, uppercase |
JAN-DEC |
For input, source string always folded to uppercase. For output, M generates uppercase and m generates lowercase. Output is padded with blanks (␢) (unless Z specified) or truncated to match the number of M's, up to 20. |
DD ZD DDD | 2-digit day of month 1- or 2-digit day of mo. day of year (Julian day) | 01-31 1-31 001-366 | For output, leading zero is always suppressed. For input, ZD treated as DD. |
HH ZH | 2-digit hour 1- or 2-digit hour | 00-23 0-23 | For output, leading zero suppressed. For input, ZH treated as HH. If AP specified, valid values are 01-12. |
MI | minute | 00-59 | |
SS | second | 00-59 | |
9 99 999 | tenths of a second |
0-9 |
No rounding. |
AP ap A.P. a.p. | AM/PM indicator | AM or PM am or pm A.M. or P.M. a.m. or p.m. | AP affects HH/ZH field. For input, source string always folded to uppercase. For output, AP generates uppercase and ap generates lowercase. |
W |
1-char day-of-week |
S, M, T, W, T, F, S |
For input, Ws are ignored. For output, W generates uppercase and w generates lowercase. Output padded with blanks (unless Z specified) or truncated to match the number of Ws, up to 20. |
All others | Delimiters Constants | X'01'-X'FF' (X'00' reserved for Language Environment use) | For input, treated as delimiters between the month, day, year, hour, minute, second, and fraction of a second. For output, copied exactly as is to the target string. Constant designating year in Russia, Estonia, Latvia, Lithuania, and the Russian Federation. Constant designating time in Sweden. |
Note: If
a Z/z could be interpreted as belonging to the preceding
character string and to the following string, then it is always
considered part of the following string, even if it would be legal
with the preceding string but illegal with the following string. For
clarity, you should always use a delimiter to define which string
the Z/z belongs with. See Table 2 for
an example.
|
Picture strings | Examples | Notes® |
---|---|---|
YYMMDD |
880516 |
1988-5-16 would also be valid input. Showa is a Japanese Era name. Showa 63 equals 1988. |
MMDDYY |
050688 |
Accepts imbedded blanks 1-digit year format (Y) valid for output only |
DD.MM.YY |
09.06.88 |
|
YY.DDD |
88.137 |
Julian date |
YYMMDDHHMISS |
880516204229 |
Timestamp valid only for CEESECS and CEEDATM. If used with CEEDATE, time positions are left blank. If used with CEEDAYS, HH, MI, SS, and 999 fields are ignored. |
Note: Lowercase characters must
be used only for alphabetic picture terms.
|
First date of Japanese Era | Era name | Era name in IBM® Japanese DBCS code | Valid year values |
---|---|---|---|
1868-09-08 | Meiji | X'0E45A645840F' | 01-45 |
1912-07-30 | Taisho | X'0E455B45770F' | 01-15 |
1926-12-25 | Showa | X'0E45B3457A0F' | 01-64 |
1989-01-08 | Heisei | X'0E458D45BA0F' | 01-999 (01 = 1989) |