
SQL — Time and Date Functions
The following time and date functions specified in the ODBC 3.51 and JDBC
2.0 specifications are supported by the BASIS DBMS.
Arguments denoted as date_exp
can be the name of a column (of SQL_DATE, Julian, or OEM date type) or
a date literal (constant).
Example
Select ship_date, Dayname(ship_date), Monthname(ship_date) from order_header
The following three types of arguments are allowed in the Time/Date functions:
|
CURTIME() or
|
OEM/Julian Date
or |
Timestamp field
or |
---|---|---|---|
HOUR |
Yes |
|
Yes |
MINUTE |
Yes |
|
Yes |
SECOND |
Yes |
|
Yes |
YEAR |
|
Yes |
Yes |
MONTH |
|
Yes |
Yes |
DAYOFWEEK |
|
Yes |
Yes |
QUARTER |
|
Yes |
Yes |
DAYNAME |
|
Yes |
Yes |
DAYOFMONTH |
|
Yes |
Yes |
DAYOFYEAR |
|
Yes |
Yes |
MONTHNAME |
|
Yes |
Yes |