Valid Date Formats
Appendix J - Valid Date Formats
This appendix explicitly lists all of the date forms that are considered valid by the QTRACS Date APIs. The QTRACS date routines accept many valid forms. If a form is not found in this appendix then it is not valid. Four types of formats are accepted by QTRACS: *YMD, *MDY, *DMY, and *JUL. For each format type, there are many possible date forms, no two of which are alike.
The following Date APIs accept the date forms listed in this appendix:
- OMDT2GMT Convert Date/Time To GMT Seconds
- OMDZ2GMT Convert Date/Time, Given a Time Zone, To GMT Seconds
- OMDP2GMT Convert Date/Time, Given a Place, to GMT Seconds
- OMPVDAT Parse and Validate Date/Time String
YMD Dates
The following table lists the 74 valid *YMD date forms.
Notes:
- A single-digit century code (C) is valid in some cases. If so, the valid values are 0 (20th century) or 1 (21st century).
- A double-digit century code (XX) is valid in some cases. If so, the valid values are 19 or 20.
- Valid separators are a colon, a comma, a period, a slash, and a dash.
- If separators are given, then a single-digit month (M) may be specified.
- If separators are given, then a single-digit day (D) may be specified.
- If separators are given, then a single-digit hour (h) may be specified.
- A timezone code (e.g. GMT, EDT, etc.) may be optionally specified in positions 19-22 or 21-24 on those input dates that contain a time.
| Valid *YMD Formats | Sample |YYMMDD
880203
CYYMMDD
0880203
XXYYMMDD
19880203
CYYMMDDhh
088020304
YYMMDDhhmm
8802030405
CYYMMDDhhmm
08802030405
YYMMDDhhmmss
880203040506
CYYMMDDhhmmss
0880203040506
XXYYMMDDhhmmss
19880203040506
YYMMDD hh
880203 04
YYMMDD hhmm
880203 0405
YYMMDD hhmmss
880203 040506
CYYMMDD hh
0880203 04
CYYMMDD hhmm
0880203 0405
CYYMMDD hhmmss
0880203 040506
XXYYMMDD hh
19880203 04
XXYYMMDD hhmm
19880203 0405
XXYYMMDD hhmmss
19880203 040506
YY.M.D
88/2/3
YY.M.DD
88/2/03
YY.MM.D
88/02/3
YY.MM.DD
88/02/03
XXYY.M.D
1988/2/3
XXYY.M.DD
1988/2/03
XXYY.MM.D
1988/02/3
XXYY.MM.DD
1988/02/03
YY.M.D hh
88/2/3 04
YY.M.D hh.mm
88/2/3 04:05
YY.M.D hh.mm.ss
88/2/3 04:05:06
YY.M.DD hh
88/2/03 04
YY.M.DD hh.mm
88/2/03 04:05
YY.M.DD hh.mm.ss
88/2/03 04:05:06
YY.MM.D hh
88/02/3 04
YY.MM.D hh.mm
88/02/3 04:05
YY.MM.D hh.mm.ss
88/02/3 04:05:06
YY.MM.DD hh
88/02/03 04
YY.MM.DD hh.mm
88/02/03 04:05
YY.MM.DD hh.mm.ss
88/02/03 04:05:06
YY.M.D h
88/2/3 4
YY.M.D h.mm
88/2/3 4:05
YY.M.D h.mm.ss
88/2/3 4:05:06
YY.M.DD h
88/2/03 4
YY.M.DD h.mm
88/2/03 4:05
YY.M.DD h.mm.ss
88/2/03 4:05:06
YY.MM.D h
88/02/3 4
YY.MM.D h.mm
88/02/3 4:05
YY.MM.D h.mm.ss
88/02/3 4:05:06
YY.MM.DD h
88/02/03 4
YY.MM.DD h.mm
88/02/03 4:05
YY.MM.DD h.mm.ss
88/02/03 4:05:06
XXYY.M.D hh
1988/2/3 04
XXYY.M.D hh.mm
1988/2/3 04:05
XXYY.M.D hh.mm.ss
1988/2/3 04:05:06
XXYY.M.DD hh
1988/2/03 04
XXYY.M.DD hh.mm
1988/2/03 04:05
XXYY.M.DD hh.mm.ss
1988/2/03 04:05:06
XXYY.MM.D hh
1988/02/3 04
XXYY.MM.D hh.mm
1988/02/3 04:05
XXYY.MM.D hh.mm.ss
1988/02/3 04:05:06
XXYY.MM.DD hh
1988/02/03 04
XXYY.MM.DD hh.mm
1988/02/03 04:05
XXYY.MM.DD hh.mm.ss
1988/02/03 04:05:06
MDY Dates
The following table lists the 106 valid *MDY date forms.
Notes:
- A single-digit century code (C) is valid in some cases. If so, the valid values are 0 (20th century) or 1 (21st century)
- A double-digit century code (XX) is valid in some cases. If so, the valid values are 19 or 20.
- Valid separators are a colon, a comma, a period, a slash, and a dash.
- If separators are given, then a single-digit month (M) may be specified.
- If separators are given, then a single-digit day (D) may be specified.
- If separators are given, then a single-digit hour (h) may be specified.
- A timezone code (e.g. GMT, EDT, etc.) may be optionally specified in positions 19-22 or 21-24 on those input dates that contain a time.
Valid *MDY Formats | Sample |
---|---|
MMDD | 0203 |
MMDD hh | 0203 04 |
MMDD hhmm | 0203 0405 |
MMDD hhmmss | 0203 040506 |
M.D | 2/3 |
M.DD | 2/03 |
MM.D | 02/3 |
MM.DD | 02/03 |
M.D hh | 2/3 04 |
M.D hh.mm | 2/3 04:05 |
M.D hh.mm.ss | 2/3 04:05:06 |
M.DD hh | 2/03 04 |
M.DD hh.mm | 2/03 04:05 |
M.DD hh.mm.ss | 2/03 04:05:06 |
MM.D hh | 02/3 04 |
MM.D hh.mm | 02/3 04:05 |
MM.D hh.mm.ss | 02/3 04:05:06 |
MM.DD hh | 02/03 04 |
MM.DD hh.mm | 02/03 04:05 |
MM.DD hh.mm.ss | 02/03 04:05:06 |
M.D h | 2/3 4 |
M.D h.mm | 2/3 4:05 |
M.D h.mm.ss | 2/3 4:05:06 |
M.DD h | 2/03 4 |
M.DD h.mm | 2/03 4:05 |
M.DD h.mm.ss | 2/03 4:05:06 |
MM.D h | 02/3 4 |
MM.D h.mm | 02/3 4:05 |
MM.D h.mm.ss | 02/3 4:05:06 |
MM.DD h | 02/03 4 |
MM.DD h.mm | 02/03 4:05 |
MM.DD h.mm.ss | 02/03 4:05:06 |
M.D.XXYY hh | 2/3/1988 04 |
M.D.XXYY hh.mm | 2/3/1988 04:05 |
M.D.XXYY hh.mm.ss | 2/3/1988 04:05:06 |
M.DD.XXYY hh | 2/03/1988 04 |
M.DD.XXYY hh.mm | 2/03/1988 04:05 |
M.DD.XXYY hh.mm.ss | 2/03/1988 04:05:06 |
MM.D.XXYY hh | 02/3/1988 04 |
MM.D.XXYY hh.mm | 02/3/1988 04:05 |
MM.D.XXYY hh.mm.ss | 02/3/1988 04:05:06 |
MM.DD.XXYY hh | 02/03/1988 04 |
MM.DD.XXYY hh.mm | 02/03/1988 04:05 |
MM.DD.XXYY hh.mm.ss | 02/03/1988 04:05:06 |
M.D.XXYY h | 2/3/1988 4 |
M.D.XXYY h.mm | 2/3/1988 4:05 |
M.D.XXYY h.mm.ss | 2/3/1988 4:05:06 |
M.DD.XXYY h | 2/03/1988 4 |
M.DD.XXYY h.mm | 2/03/1988 4:05 |
M.DD.XXYY h.mm.ss | 2/03/1988 4:05:06 |
MM.D.XXYY h | 02/3/1988 4 |
MM.D.XXYY h.mm | 02/3/1988 4:05 |
MM.D.XXYY h.mm.ss | 02/3/1988 4:05:06 |
MM.DD.XXYY h | 02/03/1988 4 |
MM.DD.XXYY h.mm | 02/03/1988 4:05 |
MM.DD.XXYY h.mm.ss | 02/03/1988 4:05:06 |
DMY Dates
The following table lists the 106 valid *DMY date forms.
Notes:
- A single-digit century code (C) is valid in some cases. If so, the valid values are 0 (20th century) or 1 (21st century).
- A double-digit century code (XX) is valid in some cases. If so, the valid values are 19 or 20.
- Valid separators are a colon, a comma, a period, a slash, and a dash.
- If separators are given, then a single-digit month (M) may be specified.
- If separators are given, then a single-digit day (D) may be specified.
- If separators are given, then a single-digit hour (h) may be specified.
- A timezone code (e.g. GMT, EDT, etc.) may be optionally specified in positions 19-22 or 21-24 on those input dates that contain a time.
Valid *DMY Formats | Sample |
---|---|
DDMMYY | 010203 |
DDMMYYYY | 01022003 |
DDMMYYC | 0102030 |
DDMMYYXX | 01020319 |
DDMMYYh | 0102031 |
DDMMYYhXX | 010203119 |
DDMMYYhC | 01020301 |
DDMMYYhXXC | 010203191 |
DDMMYYhTZ | 0102031GMT |
DDMMYYhXXTZ | 010203119GMT |
DDMMYYhCTZ | 01020301GMT |
DDMMYYhXXCTZ | 010203191GMT |
DDMMYYhTZD | 0102031GMT-0500 |
DDMMYYhXXTZD | 010203119GMT-0500 |
DDMMYYhCTZD | 01020301GMT-0500 |
DDMMYYhXXCTZD | 010203191GMT-0500 |
DDMMYYhTZDZ | 0102031GMT-0500EDT |
DDMMYYhXXTZDZ | 010203119GMT-0500EDT |
DDMMYYhCTZDZ | 01020301GMT-0500EDT |
DDMMYYhXXCTZDZ | 010203191GMT-0500EDT |
DDMMYYhTZDZZ | 0102031GMT-0500EDT-0400 |
DDMMYYhXXTZDZZ | 010203119GMT-0500EDT-0400 |
DDMMYYhCTZDZZ | 01020301GMT-0500EDT-0400 |
DDMMYYhXXCTZDZZ | 010203191GMT-0500EDT-0400 |
DDMMYYhTZDZZZ | 0102031GMT-0500EDT-0400EST |
DDMMYYhXXTZDZZZ | 010203119GMT-0500EDT-0400EST |
DDMMYYhCTZDZZZ | 01020301GMT-0500EDT-0400EST |
DDMMYYhXXCTZDZZZ | 010203191GMT-0500EDT-0400EST |
DDMMYYhTZDZZZZ | 0102031GMT-0500EDT-0400EST-0300 |
DDMMYYhXXTZDZZZZ | 010203119GMT-0500EDT-0400EST-0300 |
DDMMYYhCTZDZZZZ | 01020301GMT-0500EDT-0400EST-0300 |
DDMMYYhXXCTZDZZZZ | 010203191GMT-0500EDT-0400EST-0300 |
DDMM | 0302 |
DDMM hh | 0302 04 |
DDMM hhmm | 0302 0405 |
DDMM hhmmss | 0302 040506 |
D.M | 3/2 |
D.MM | 3/02 |
DD.M | 03/2 |
DD.MM | 03/02 |
D.M hh | 3/2 04 |
D.M hh.mm | 3/2 04:05 |
D.M hh.mm.ss | 3/2 04:05:06 |
D.MM hh | 3/02 04 |
D.MM hh.mm | 3/02 04:05 |
D.MM hh.mm.ss | 3/02 04:05:06 |
DD.M hh | 03/2 04 |
DD.M hh.mm | 03/2 04:05 |
DD.M hh.mm.ss | 03/2 04:05:06 |
DD.MM hh | 03/02 04 |
DD.MM hh.mm | 03/02 04:05 |
DD.MM hh.mm.ss | 03/02 04:05:06 |
D.M h | 3/2 4 |
D.M h.mm | 3/2 4:05 |
D.M h.mm.ss | 3/2 4:05:06 |
D.MM h | 3/02 4 |
D.MM h.mm | 3/02 4:05 |
D.MM h.mm.ss | 3/02 4:05:06 |
DD.M h | 03/2 4 |
DD.M h.mm | 03/2 4:05 |
DD.M h.mm.ss | 03/2 4:05:06 |
DD.MM h | 03/02 4 |
DD.MM h.mm | 03/02 4:05 |
DD.MM h.mm.ss | 03/02 4:05:06 |
DDMMYY | 030288 |
CDDMMYY | 0030288 |
DDMMXXYY | 03021988 |
CDDMMYYhh | 003028804 |
DDMMYYhhmm | 0302880405 |
CDDMMYYhhmm | 00302880405 |
DDMMYYhhmmss | 030288040506 |
CDDMMYYhhmmss | 0030288040506 |
DDMMXXYYhhmmss | 03021988040506 |
DDMMYY hh | 030288 04 |
DDMMYY hhmm | 030288 0405 |
DDMMYY hhmmss | 030288 040506 |
CDDMMYY hh | 0030288 04 |
CDDMMYY hhmm | 0030288 0405 |
CDDMMYY hhmms | 0030288 040506 |
DDMMXXYY hh | 03021988 04 |
DDMMXXYY hhmm | 03021988 0405 |
DDMMXXYY hhmmss | 03021988 040506 |
D.M.YY | 3/2/88 |
D.MM.YY | 3/02/88 |
DD.M.YY | 03/2/88 |
DD.MM.YY | 03/02/88 |
D.M.XXYY | 3/2/1988 |
D.MM.XXYY | 3/02/1988 |
DD.M.XXYY | 03/2/1988 |
DD.MM.XXYY | 03/02/1988 |
D.M.YY hh | 3/2/88 04 |
D.M.YY hh.mm | 3/2/88 04:05 |
D.M.YY hh.mm.ss | 3/2/88 04: |
D.MM.YY hh | 3/02/88 04 |
D.MM.YY hh.mm | 3/02/88 04:05 |
D.MM.YY hh.mm.ss | 3/02/88 04:05:06 |
DD.M.YY hh | 03/2/88 04 |
DD.M.YY hh.mm | 03/2/88 04:05 |
DD.M.YY hh.mm.ss | 03/2/88 04:05:06 |
DD.MM.YY hh | 03/02/88 04 |
DD.MM.YY hh.mm | 03/02/88 04:05 |
DD.MM.YY hh.mm.ss | 03/02/88 04:05:06 |
D.M.YY h | 3/2/88 4 |
D.M.YY h.mm | 3/2/88 4:05 |
D.M.YY h.mm.ss | 3/2/88 4:05:06 |
D.MM.YY h | 3/02/88 4 |
D.MM.YY h.mm | 3/02/88 4:05 |
D.MM.YY h.mm.ss | 3/02/88 4:05:06 |
DD.M.YY h | 03/2/88 4 |
DD.M.YY h.mm | 03/2/88 4:05 |
DD.M.YY h.mm.ss | 03/2/88 4:05:06 |
DD.MM.YY h | 03/02/88 4 |
DD.MM.YY h.mm | 03/02/88 4:05 |
DD.MM.YY h.mm.ss | 03/02/88 4:05:06 |
D.M.XXYY hh | 3/2/1988 04 |
D.M.XXYY hh.mm | 3/2/1988 04:05 |
D.M.XXYY hh.mm.ss | 3/2/1988 04:05:06 |
D.MM.XXYY hh | 3/02/1988 04 |
D.MM.XXYY hh.mm | 3/02/1988 04:05 |
D.MM.XXYY hh.mm.ss | 3/02/1988 04:05:06 |
DD.M.XXYY hh | 03/2/1988 04 |
DD.M.XXYY hh.mm | 03/2/1988 04:05 |
DD.M.XXYY hh.mm.ss | 03/2/1988 04:05:06 |
DD.MM.XXYY hh | 03/02/1988 04 |
DD.MM.XXYY hh.mm | 03/02/1988 04:05 |
DD.MM.XXYY hh.mm.ss | 03/02/1988 04:05:06 |
D.M.XXYY h | 3/2/1988 4 |
D.M.XXYY h.mm | 3/2/1988 4:05 |
D.M.XXYY h.mm.ss | 3/2/1988 4:05:06 |
D.MM.XXYY h | 3/02/1988 4 |
D.MM.XXYY h.mm | 3/02/1988 4:05 |
D.MM.XXYY h.mm.ss | 3/02/1988 4:05:06 |
DD.M.XXYY h | 03/2/1988 4 |
DD.M.XXYY h.mm | 03/2/1988 4:05 |
DD.M.XXYY h.mm.ss | 03/2/1988 4:05:06 |
DD.MM.XXYY h | 03/02/1988 4 |
DD.MM.XXYY h.mm | 03/02/1988 4:05 |
DD.MM.XXYY h.mm.ss | 03/02/1988 4:05:06 |
Julian Dates
The following table lists the 25 valid *JUL date forms.
Notes:
- A double-digit century code (XX) is valid in some cases. If so, the valid values are 19 or 20.
- A triple-digit day code (DDD) is required in all cases. The valid range is 1 to 365 in non-leap years; and 1 to 366 in leap years.
- Valid separators are a colon, a comma, a period, a slash, and a dash.
- If separators are given, then a single-digit hour (h) may be specified.
- A timezone code (e.g. GMT, EDT, etc.) may be optionally specified in positions 19-22 or 21-24 on those input dates that contain a time.
Valid *JUL Formats | Sample |
---|---|
YYDDD | 88365 |
XXYYDDD | 1988365 |
YYDDDhhmm | 883650405 |
YYDDDhhmmss | 88365040506 |
XXYYDDDhhmmss | 1988365040506 |
YYDDD hh | 88365 04 |
YYDDD hhmm | 88365 0405 |
YYDDD hhmmss | 88365 040506 |
XXYYDDD hh | 1988365 04 |
XXYYDDD hhmm | 1988365 0405 |
XXYYDDD hhmmss | 1988365 040506 |
YY.DDD | 88/365 |
XXYY.DDD | 1988/365 |
YY.DDD hh | 88/365 04 |
YY.DDD hh.mm | 88/365 0405 |
YY.DDD hh.mm.ss | 88/365 040506 |
YY.DDD h | 88/365 4 |
YY.DDD h.mm | 88/365 4:05 |
YY.DDD h.mm.ss | 88/365 4:05:06 |
XXYY.DDD hh | 1988/365 04 |
XXYY.DDD hh.mm | 1988/365 04:05 |
XXYY.DDD hh.mm.ss | 1988/365 04:05:06 |
XXYY.DDD h | 1988/365 4 |
XXYY.DDD h.mm | 1988/365 4:05 |
XXYY.DDD h.mm.ss | 1988/365 4:05:06 |