Handling of Timestamp or DateTime columns

These notes apply to the datatypes recognized by ODBC as SQL_TIMESTAMP, as well as the IBM i native datatype Timestamp (Z). These datatypes contain a date and time in one column.

When a timestamp column is imported into the LANSA Data Dictionary as a column without the ASQN attribute, the default value '1900-01-01' is assigned. This value must be reviewed to verify its suitability.

The length of the column is between 19 and 29, depending on the native datatype.

The system variables *TIMESTAMP_DFT, *TIMESTAMP_LOVAL, and *TIMESTAMP_HIVAL are also available. On platforms other than IBM i, *TIMESTAMP_DFT and *TIMESTAMP_LOVAL both evaluate to '1900-01-01 00:00:00.000000'. On IBM i, these system variables evaluation to '0001-01-01.00.00.00.000000'. On both platforms, *TIMESTAMP_HIVAL evaluates to midnight on 9999-12-31.

The *TIMESTAMP_XXX variables may only be specified as the column's default value where the column length is 26 or higher. If you want to use these values with a shorter column, use a virtual column of length 26.

If the column is of type Alphanumeric, one of the following formats must be used:

Also See

Using SQL Server datatype Smalldatetime

IBM i RDMLX Other Tables