Time and Date Literals
- Last Updated: October 3, 2020
- 1 minute read
- DataDirect Connectors
- ODBC
- Cloudera Impala 7.1
- dBase 7.1
- Flat files/Text 7.1
- MySQL 7.1
- Pervasive (Btrieve) 7.1
- XML 7.1
- Documentation
Time and Date Literals
Date, time, and timestamp literals are date, time, and timestamp values surrounded by a standard prefix and suffix. Date literals are specified in a YYYY-MM-DD format. Time literals are specified in an HH:MM:SS format with an optional fraction component. Timestamp literals are a concatenation of date and time values.
Examples for ODBC and SQL syntax are shown in the following table.
| Literal Type | ODBC Syntax | ANSI SQL-92 Syntax |
|---|---|---|
| Date Literal |
|
|
| Time Literal |
|
|
| Timestamp Literal |
|
|
| Timestamp Literal |
|
|
Note: ODBC 1.x style ODBC escape sequences
such as the following are not supported:
--(*VENDOR(Microsoft), PRODUCT(ODBC) ...*)--