date and time datatypes

There are two new datatypes, date and time, in Replication Server. These datatypes extend the existing datetime and smalldatetime datatypes, providing date and time columns to replicate and standby databases. Both are fixed-width 4-byte datatypes that support rs_subcmp, and mixed-version environments.

Replication Server version 12.6 with date and time datatype support is backward-compatible with earlier versions of Adaptive Server. However, earlier versions of Adaptive Server do not recognize date and time, and thus can send only datetime and smalldatetime data.

The new columns generated by date and time datatypes allow you to replicate date and time data to both standby and replicate databases. These columns can be part of the primary key in a replication definition, and are searchable columns in a replication definition. You can use date and time columns in the where clause of define subscription, create subscription, or create article. In the same way, the date and time columns are searchable parameters in a function replication definition, again used in the where clause of define subscription, create subscription, or create article.

Table 9-1: Range and storage needs for date/time datatypes

Datatype

Range

Storage needed

date

January 1, 0001 to December 31, 9999

4

time

12:00:00 AM to 11:59:59.999 PM

4

smalldatetime

January 1, 1900 to June 6, 2079; 12:00:00AM to 11:59:59:999 PM

4

datetime

January 1, 1753 to December 31, 9999; 12:00:00AM to 11:59:59.999 PM

8