|
|
|
|
|
|
|
requirements in situations where large numbers of records with date and time information are kept for extended periods of time. Compression also provides a limited amount of data security. |
|
|
|
|
|
|
|
|
5.6.4.1
Date and Day Number |
|
|
|
|
|
|
|
|
The first set of compression routines converts day and month to and from a day number within a given year (DOY). |
|
|
|
|
|
|
|
|
date_to_day_number () returns the number of days that have elapsed in the given year, including the given day. |
|
|
|
|
|
|
|
|
day_number_to_date () returns the date corresponding to the day number for a given year in the Western calendar. |
|
|
|
|
|
|
|
|
The second set of compression functions interconverts dates and type int variables. |
|
|
|
|
|
|
|
|
date_to_int () packs the values in a DATE_INFO structure into a single type int variable of 16 bits. |
|
|
|
|
|
|
|
|
int_to_date () unpacks the values in a single type int variable of 16 bits into a DATE_INFO structure. The integer is assumed to contain a date in a specific compressed format. |
|
|
|
|
|
|
|
|
5.6.4.3
Date and Long Integer |
|
|
|
|
|
|
|
|
The third set of compression functions interconverts dates and type long variables. |
|
|
|
|
|
|
|
|
date_to_long () stores the values in a DATE_INFO structure into a single type long date stamp variable. |
|
|
|
|
|
|
|
|
long_to_date () unpacks the values in a single type long date stamp variable into a DATE_INFO structure. |
|
|
|
|
|
|
|
|
The fourth set of compression functions converts time of day to and from type int variables. |
|
|
|
|
|
|
|
|
int_to_time () unpacks the values in a single type int variable of 16 bits into a TIME_INFO structure. |
|
|
|
|
|
|
|
|
time_to_int () packs the values in a TIME_INFO structure into a single type int variable of 16 bits. |
|
|
|
|
|