Time literals
- Last Updated: May 18, 2020
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Time literals specify an hour, minute, second, and millisecond, using the following format, enclosed in single quotation marks (' ' ).
Syntax
This is the syntax for time literals:
|
Parameters
- { t 'hh:mi:ss' }
-
A time literal enclosed in an escape clause is compatible with ODBC. Precede the literal string with an open brace (
{) and a lowercaset. End the literal with a close brace (}).Note: If you use the ODBC escape clause, you must specify the time using the format hh:mi:ss. - hh
-
Specifies the hour value as a two‑digit number in the range
00to23. - mi
-
Specifies the minute value as a two‑digit number in the range
00to59. - ss
-
Specifies the seconds value as a two‑digit number in the range
00to59. - mls
-
Specifies the milliseconds value as a three‑digit number in the range
000to999.
Examples
The
following example illustrates how to use the time literal format
with an INSERT statement:
|
The INSERT statements in the
following example show some of the formats SQL will and will not
accept for time literals:
|
The SELECT statement in the
following example illustrates which INSERT statements
successfully inserted a row:
|