Previous Topic: Alphanumeric fieldNext Topic: Flag


Date field

A field with a data type of D. The date field has a numeric value indicating an integer number of days from December 31, 1900 (day zero), plus or minus. You can use date fields anywhere numeric fields can be used, except where noted.

You cannot transmit date fields to a panel. To use a date field in a panel display, first use the $DATE or $STRING function to convert the date field to an alphanumeric field, and then transmit it. To use a date with a positive value as a key, store it in an unsigned numeric field.

CA Ideal processes dates between 2000 BC and 9999 AD. Any other date causes a runtime error.

SQL DATE, TIME, and TIMESTAMP fields are supported for CA Datacom/DB native access; however, they are converted to character (Type X) with the following lengths:

DATE  10
TIME  8
TIMESTAMP  26

These fields are stored as binary, unsigned, integer fields. CA Ideal automatically handles conversion between the storage format and the display format (character). In addition, when a record is added with a FOR NEW statement, any DATE, TIME, or TIMESTAMP fields are initialized using the system date and time.