DATE
An item of type DATE is a series of eight single-byte numeric digits that reflect a specific calendar date.
The format of type DATE is yyyymmdd:
- yyyy
- Four digits that represent a year. The range is 0000 to 9999.
- mm
- Two digits that represent a month. The range is 01 to 12.
- dd
- Two digits that represent a day. The range is 01 to 31, and an error occurs if your code assigns an invalid date such as 20050230.
The internal hexadecimal representation of an example value is as follows if the item is on a host environment which uses EBCDIC:
// March 15, 2005 F2 F0 F0 F5 F0 F3 F1 F5The internal hexadecimal representation of an example value is as follows if the item is on a workstation environment like Windows 2000, which uses ASCII:
// March 15, 2005 32 30 30 35 30 33 31 35An item of type DATE can receive data from and provide data to a relational database.
Related reference
Date and time (system words)
Datetime expressions
Primitive types