Home | Previous Page | Next Page   Data Manipulation > Using Date and Time Data Types > Date Data >

Date Binary Representation

The SQL DATE data type holds the internal (binary) format of a decimal value. This value is an integer value that represents the number of days since December 31, 1899. Dates before December 31, 1899, are negative numbers, while dates after December 31, 1899, are positive numbers. For a detailed description of the SQL DATE data type, see the IBM Informix: Guide to SQL Reference.

Tip:
The internal format of the DATE data type is often referred to as its binary representation.

The DataBlade API supports the SQL DATE data type with the mi_date data type. Therefore, the mi_date data type also holds the binary representation of a date value.

Server Only

The mi_date data type is guaranteed to be four bytes on all computer architectures. All mi_date values can fit into an MI_DATUM structure and can be passed by value within C UDRs.

End of Server Only
Client Only

All data types, including mi_date, must be passed by reference within client LIBMI applications.

End of Client Only

Because the binary representation of a DATE (and mi_date) value is an Informix-proprietary format, you cannot use standard system functions to obtain date information from mi_date values. Instead, the DataBlade API provides the following support for the DATE data type.

Category of DATE Function More Information
Conversion functions Conversion of Date Representations
Operation functions Operations on Date Data
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]