5.2.4 Date and Time Formats
The International Standard for the representation of dates and times is ISO8601.
For unambiguous representation of dates and times the following formats have been chosen. The date separator - (dash) can be replaced with a / (slash). The time element separator T can be a blank. The time zone value of hh:mm can be hhmm or hh, but the + or - is mandatory. If no time zone is present then a hierarchy of time zones will be used, the time zone determined by the service or +00:00.
A program can pass a date value to the service using different formats. If the program field is numeric then use the all numbers format. If program field is an alphanumeric then use the string format or numeric format.
Possible program field values:
YYYYMMDD [TZD]
YYYYMMDDHHMMSS [TZD]
YYYY-MM-DD [TZD]
YYYY/MM/DD [TZD]
YYYY-MM-DD HH:MM:SS [TZD]
YYYY-MM-DDTHH:MM:SS [TZD]
YYYY-MM-DDTHH:MM:SS.SSSSSSSSS [TZD]
YYYY
Four-digit year (1000-9999).
MM
Two-digit month (01-12).
DD
Two-digit day (01-31).
HH
Two-digit hour (00-23).
Default. 00.
MM
Two-digit minute (00-59).
Default 00.
SS
Two-digit second (00-59).
Default 00.
SSSSSSSSS
One to nine digits representing a decimal fraction of a second.
Default: 000000000.
TZD
Time zone designator (Z or +hh:mm or -hh:mm)
Z means GMT or +00:00.
Default. +00:00.
Example program field date values:
20040331
20040331+10
20040331150000
20040331150000Z
20040331150000+10
20040331150000+1000
20040331150000+10:00
2004-03-31
2004-03-31+10
2004-03-31 15:00:00
2004-03-31 15:00:00Z
2004-03-31 15:00:00+10
2004-03-31 15:00:00+1000
2004-03-31 15:00:00+10:00
2004-03-31 15:00:00.000+10
2004-03-31T15:00:00.000+10:00
To convert a date time into a string representation the following case-sensitive date format patterns can be used.
yy |
2-digit year |
00-99. |
yyyy |
4-digit year |
1000-9999. |
MM |
Month in year |
01-12. |
MMM |
Month in year |
Jan-Dec (Locale dependent). |
MMMM |
Month in year |
January-December (Locale dependent). |
dd |
Day in month |
01-31. |
HH |
Hour in day |
00-23. |
mm |
Minute in hour |
00-59. |
ss |
Second in minute |
00-59. |
SSS |
Millisecond |
000. |
SSSSSSSSS |
Nanosecond |
000000000. |
z |
Time zone |
GMT+00:00. |
Z |
Time zone |
+0000. |
ZZ |
Time zone |
+00:00. |
AM/PM |
AM PM Marker |
AM or PM (Locale dependant). |
hh |
Hour in AM/PM |
1-12. |
EE |
Day in week |
1-7. |
EEE |
Day in week |
Sun-Sat (Locale dependant). |
EEEE |
Day in week |
Sunday-Saturday (Locale dependant). |
Example date format patterns:
dd-MM-yyyy
dd-MM-yyyy HH:mm:ss
dd-MM-yyyy HH:mm:ss Z