5.1.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). |
MM |
Two digit minute (00-59). |
SS |
Two digit second (00-59). |
SSSSSSSSS |
One to nine digits representing a decimal fraction of a second. |
TZD |
Time zone designator (Z or +hh:mm or -hh:mm) |
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.
|
Example date format patterns:
dd-MM-yyyy
dd-MM-yyyy HH:mm:ss
dd-MM-yyyy HH:mm:ss Z