DATE

DATE column data is stored in SAP Sybase IQ as 4 bytes (a 32-bit unsigned integer) representing the number of days since 0000-01-01.

To convert a calendar date to the SAP Sybase IQ binary format, for a given year, month, and day, use:

year = current_year - 1;
days_in_year_0000 = 366;
binaryDateValue = (year * 365)
+ (year / 4)
- (year / 100)
+ (year / 400)
+ days_in_year_0000
+ day_of_current_year 
-1;

For the day_of_current_year value in the formula above, consider the following example: February 12 is day 43.

Related concepts
IQ Binary Load Format and Load Efficiency
Operating System Native Data Types
TIME
TIMESTAMP
NUMERIC and DECIMAL
NULL Value Loads