摘要 |
In a database having date fields, years past 1999 are written in a format such as binary integer format or binary-coded decimal format, either of which can be signed or unsigned. In the binary-coded decimal format, two bytes generally used to indicate the last two digits of the year can instead be used to indicate a sign and three digits. If the number of years elapsed since 1900 is used, the positive numbers from zero to 999 represent the years 1900-2899, while negative numbers represent years before 1900. Year data written in either of these formats can coexist with year data written in legacy formats, in which case the legacy and enterprise formats are distinguished by comparison of the binary integer value of a year datum or a portion thereof with a predetermined range or by checking one or more bits. The legacy format can be a format such as ASCII, EBCDIC or BCD Julian. |