%DateTimeIn meta-SQL element
Syntax
%DateTimeIn(dtt)
Description
The %DateTimeIn meta-SQL variable expands to platform-specific SQL for a DateTime value in the Where clause of a SQL Select or Update statement, or when a DateTime value is passed in an Insert statement.
Parameters
| Parameter | Description |
|---|---|
|
dtt |
Specify either a DateTime bind variable or a string literal in the form YYYY-MM-DD-hh.mm.ss.ssssss. |
Restrictions Using COBOL
You can only use string literals when using this construct in COBOL. You cannot use it with bind parameters in COBOL. For example, the following works in COBOL:
UPDATE PS_PERSONAL_DATA SET LASTUPDTTM = %DATETIMEIN('2002-12-11-11.59.00.000000')
The following SQL fails:
UPDATE PS_PERSONAL_DATA SET LASTUPDTTM = %DATETIMEIN(:1)