1.1.11 Date

Date is a fixed-length field with a length of 10, containing a date in ISO format: YYYY-MM-DD. The *NULL value is 1900-01-01, as this value is valid across all supported databases.

Please review the general 1.1.1 Field Type Considerations.

Field Definition Rules

Rules for defining a Date field in the repository are:

Length

Dates must be 10 in length. Dates have no decimals.

Valid Keyboard Shift

Blanks

Allowed Attributes

AB, ASQN, CYDC, CYDU, CYDX, CS, FE, ISO, ND, RA, RL, RLTB.

Note: ISO for display format must be selected.

Edit Mask

Not allowed.

Default

*SQLNULL. ASQN will be enabled by default.

 

Field Definition Notes

Usage Rules

Partition Type

RDMLX Enabled Partition

Files

Dates may only be used in RDMLX Files. Dates may be used as real fields or keys. If used as key fields, take note of the Warning below.

Logical Views

Dates may be used as keys to logical views.

Virtual Fields

Dates may be used with Date Virtual Fields as the source field.

Dates may be used with Code Fragment Virtual Fields.

Predetermined Join Fields

Not allowed.

RDML Commands

Dates are classified as their own types and are not valid for numeric or alpha command parameters in RDML commands.

Built-In Functions

When used in Built-In Functions, Dates are classified as their own type (D) and are not valid for numeric or alpha arguments.

Special Values

*NULL, *HIVAL, *LOVAL, *REMEMBERED_VALUE

Conversion

Date fields may be converted to alpha, signed, packed, string or char. Refer to Field Type Conversions.

 

Usage Notes

Warnings

Platform Considerations

Tips & Techniques

Also See

1.1.13 DateTime

1.1.12 Time