Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Data Types and Expressions > Data Type >

Time Data Types

The time data types allow the database server to store calendar dates, points in time, and intervals of time.

Read syntax diagramSkip visual syntax diagramTime Data Types:
 
|--+-DATE-----------------------------------------------+-------|
   |                                        (1)         |
   +-INTERVAL--| INTERVAL Field Qualifier |-------------+
   |  (2)                                          (3)  |
   '--------DATETIME--| DATETIME Field Qualifier |------'
 

Notes:
  1. See INTERVAL Field Qualifier
  2. Informix extension
  3. See DATETIME Field Qualifier

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.

User-Defined Data Type (IDS)

A user-defined data type is one that a user defines for the database server. Dynamic Server supports two categories of user-defined data types, namely distinct data types and opaque data types. This is the declaration syntax for user-defined data types:

Read syntax diagramSkip visual syntax diagramUser-Defined Data Type:
 
|--+------------------------+--+-opaque_type---+----------------|
   |                (1)     |  '-distinct_type-'
   '-| Owner Name |-------.-'
 

Notes:
  1. See Owner Name

Element Description Restrictions Syntax
distinct_type Distinct data type with same structure as an existing data type Must be unique among data type names in the database Identifier
opaque_type Name of the opaque data type Must be unique among data type names in the database Identifier

In this manual, user-defined data type is usually abbreviated as UDT.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]