Date/Time, and Date and Time Datatypes

Learn about date and time datatypes.

Replication Server supports these datatypes for date and time data:
  • datetime – dates and times of day between January 1, 1753 and December 31, 9999. Storage size is 8 bytes: 4 bytes for the number of days before or after the base date of January 1, 1900, and 4 bytes for the time, to 1/300 second. Dates before the base date are stored as negative values.

  • smalldatetime – dates and times of day between January 1, 1900 and June 6, 2079, with accuracy to one minute. Storage size is 4 bytes: one small integer for the number of days after January 1, 1900, and one small integer for the number of minutes since midnight.

  • date – dates between January 1, 0001, and December 31, 9999. Storage size is 4 bytes. Dates before the base date are stored as negative values.

  • time – time between 12:00:00 AM and 11:59:59.999 PM. Storage size is 4 bytes.

  • bigtime – time of day, containing hour, minute, second, and fraction of a second corresponding to the TIME datatype in Sybase IQ. The fraction is stored to 6 decimal places. A bigtime value requires 8 bytes of storage. ODBC standards restrict bigtime datatype to an accuracy of seconds. For this reason, do not use bigtime datatypes in WHERE clause comparisons that rely on a higher accuracy than seconds.

    The valid range of bigtime is from 12:00:00.000000AM to 11:59:59.999999PM

  • bigdatetime – point in time, containing year, month, day, hour, minute, second, and fraction of a second corresponding to the TIMESTAMP datatype in Sybase IQ. The fraction is stored to 6 decimal places. The day must be a nonzero value. A bigdatetime value requires 8 bytes of storage.

    The valid range of bigdatetime is from January 1, 0001 to December 31, 9999 and from 12:00:00.000000AM to 11:59:59.999999PM. The display of bigdatetime data outside the range of 1600-02-28 23:59:59 to 7911-01-01 00:00:00 might be incomplete, but the complete bigdatetime value is stored in the database.

  • timestamp – uses varbinary(8) as the underlying datatype. A status bit differentiates timestamp from varbinary.

    timestamp is propagated as timestamp to Replication Server 15.1 and as varbinary to Replication Server 15.0.1 or earlier.

    Note: Replication into a timestamp column is supported only in ASE 15.0.2 or later.