Timestamp literals
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Timestamp literals
Timestamp literals specify a date and a time separated by a space, enclosed in single quotation marks ( ' ' ).
Syntax
This is the syntax for timestamp literals:
|
Parameters
- { ts 'yyyy-mm-dd hh:mi:ss' }
-
A timestamp literal enclosed in an escape clause is compatible with ODBC. Precede the literal string with an open brace (
{) and a lowercasets. End the literal with a close brace (}). Note that braces are part of the syntax. If you use the ODBC escape clause, you must specify the timestamp using the format yyyy-mm-dd hh:mi:ss. - date_literal
-
A date.
- time_literal
-
A time literal.
Example
The
following example illustrates how to INSERT a timestamp
literal into a column:
|
The following example illustrates a timestamp literal with the ODBC escape clause:
|