Validating date format dating woman looking

It's one thing to be able to initialize date/time fields at compile time, but in the real world, more often than not, we need to populate date/time fields with run-time data.As of V4R5, display files don't support date or time data-type fields.Depending on the date format used, the AS/400 will support dates as early as 1/1/0001 and as late as 12/31/9999.Time and timestamp fields are stored in a similar (slightly more complex) manner.Moving a field with a 4-digit year outside of this range to these fields will cause a runtime exception.

TEST will check for a valid date, time, or timestamp format in a numeric or character field.

The TIMFMT keyword is used in D-specs or H-specs to define the format of a time field.

The last 6-positions of the timestamp field are microseconds (timestamp fields are often used to generate unique keys for a file).

Timestamp fields, which include both date and time (including micro-seconds), may also be defined.

Note that a value of *SYS may be specified to initialize a date, time, or timestamp to the current system date/time.

Leave a Reply