Date Formats
Estimated reading time: 3 minutes
The following is a list of the date formats and separators for *Date data type.
RPG Name | Description | **Format (Default Separator)** |
Valid Separ- ators |
Length | Example |
4 - Digit Year Formats | |||||
*ISO | International Standards Organization | yyyy-mm-dd | - & 0 | 10 | 2007-01-15 |
*USA | IBM USA Standard | mm/dd/yyyy | / 0 | 10 | 01/15/2007 |
*EUR | IBM European Standard | dd.mm.yyyy | . 0 | 10 | 15.01.2007 |
*JIS | Japanese Industrial Standard Christian Era | yyyy-mm-dd | - 0 | 10 | 2007-01-15 |
2 - Digit Year Formats | |||||
*MDY | Month/Day/Year | mm/dd/yy | / - . , & 0 | 8 | 01/15/07 |
*DMY | Day/Month/Year | dd/mm/yy | / - . , & 0 | 8 | 15/01/07 |
*YMD | Year/Month/Day | yy/mm/dd | / - . , & 0 | 8 | 07/01/15 |
*JUL | Julian | yy/ddd | / - . , & 0 | 6 | 07/015 |
The ampersand (&) separator is replaced with a blank character. E.g., * MDY& results in the example date formated as 01 15 07 .
The zero (0) separator is replaced with no character. E.g., * MDY0 results in the example date formated as 011507 .