Contents Index How dates are stored Leap years

ASA SQL Reference
  SQL Data Types
    Year 2000 compliance

Sending and retrieving date values


Date values are stored within Adaptive Server Anywhere as either a DATE or TIMESTAMP data type, but they are passed to and retrieved from Adaptive Server Anywhere using one of the following methods:

A string containing a date value is considered unambiguous and is automatically converted to a DATE or TIMESTAMP data type without potential for misinterpretation if it is passed using the following format: yyyy-mm-dd (the "-" dash separator is one of several characters that are permitted).

For more information 

Date formats other than yyyy-mm-dd can be used by setting the DATE_FORMAT database option. For more information, see DATE_FORMAT option [compatibility].

For more information on unambiguous date formats, see Using unambiguous dates and times.

For more information on the ODBC TIMESTAMP structure, see the Microsoft Open Database Connectivity SDK, or Sending dates and times to the database.

Used in the development of C programs, an embedded SQL SQLDATETIME structure's year value is a 16-bit signed integer.

For more information on the SQLDATETIME data type, see Embedded SQL data types.


Contents Index How dates are stored Leap years