jConnect for JDBC supports the Adaptive Server datetime, smalldatetime, bigdatetime, bigtime, date, and time datatypes:
datetime can hold dates between January 1, 1753 and December 31, 9999 that are accurate to 1/300 second on platforms that support this level of granularity..
smalldatetime can hold dates from January 1, 1900 to June 6, 2079, with accuracy to the minute.
bigdatetime indicates the number of microseconds that have passed since January 1, 0000 0:00:00.000000. The range of legal bigdatetime values is from January 1, 0001 00:00:00.000000 to December 31, 9999 23:59:59.999999.
bigtime indicates the number of microseconds that have passed since the beginning of the day. The range of legal bigtime values is from 00:00:00.000000 to 23:59:59.999999.
date can hold dates from January 1, 0001 to December 31, 9999, exactly matching the allowable values in java.sql.Date. A direct mapping exists between java.sql.Date and the date datatype.
time can hold time between 00:00:00:000 and 23:59:59:990. A direct mapping exists between java.sql.Time and the time datatype.
If you select from a table that contains a date or time column, and you have not enabled date/time support in jConnect (by setting the version), the server tries to convert the date or time to a datetime value before returning it. This can cause problems if the date to be returned is prior to 1/1/1753. In that case, a conversion error occurs, and the database informs you of the error.
SQL Anywhere supports a date and time datatype, but the date and time datatypes are not yet directly compatible with those in Adaptive Server version 12.5.1 and later. Using jConnect, you should continue to use the datetime and smalldatetime datatypes when communicating with SQL Anywhere.
The maximum value in a datetime column in SQL Anywhere is 1-1-7911 00:00:00.
Using jConnect, you receive conversion errors if you attempt to insert dates prior to 1/1/1753 into datetime columns or parameters.
Refer to the Adaptive Server manuals for more information on the date and time datatypes; of special note is the section on allowable implicit conversions.
If you use getObject with an Adaptive Server date, time, or datetime column, the value returned is, respectively, a java.sql.Date, java.sql.Time, or java.sql.Timestamp datatype.
When connecting to Adaptive Server 15.5 and later, jConnect for JDBC transfers data using the bigdatetime and bigtime datatypes even if the receiving Adaptive Server columns are defined as datetime and time.
This means that Adaptive Server may silently truncate the values from jConnect for JDBC to fit Adaptive Server columns. For example, a bigtime value of 23:59:59.999999 is saved as 23:59:59.996 in an Adaptive Server column with datatype time.
When connecting to Adaptive Server 15.0.x and earlier, jConnect for JDBC transfers data using the datetime and time datatypes.