Time Data Types

The time data types store calendar dates, points in time, and intervals of time.

(1)
Time Data Types

1 DATE
1  INTERVAL  %INTERVAL Field Qualifier1
1 2 DATETIME  %DATETIME Field Qualifier3
Notes:

The following table summarizes the built-in time data types.

Data Type
Description
DATE
Stores a date value as a Julian date in the range from January 1 of the year 1 up to December 31, 9999.
DATETIME
Stores a point-in-time date (year, month, day) and time-of-day (hour, minute, second, and fraction of second), in the range of years 1 to 9999. Also supports contiguous subsets of these time units.
INTERVAL
Stores spans of time, in years and/or months, or in smaller time units (days, hours, minutes, seconds, and/or fractions of second), with up to 9 digits of precision in the largest time unit, if this is not FRACTION. Also supports contiguous subsets of these time units.

For the order of precedence among the HCL OneDB environment variables that can specify the display and data entry format of the built-in time data types, see the topic Precedence of DATE and DATETIME format specifications.