ASA SQL Reference
SQL Data Types
Date and time data types
Dates and times may be retrieved from the database in one of the following ways:
Using any interface, as a string
Using ODBC, as a TIMESTAMP structure
Using embedded SQL, as a SQLDATETIME structure
When a date or time is retrieved as a string, it is retrieved in the format specified by the database options DATE_FORMAT, TIME_FORMAT and TIMESTAMP_FORMAT. For descriptions of these options, see SET OPTION statement.
For information on functions that deal with dates and times, see Date and time functions. The following arithmetic operators are allowed on dates:
timestamp + integer Add the specified number of days to a date or timestamp.
timestamp - integer Subtract the specified number of days from a date or timestamp.
date - date Compute the number of days between two dates or timestamps.
date + time Create a timestamp combining the given date and time.