DATE

Specifies the explicit date format to use when date values are returned from database date columns into character output host variables.

When used in addition to DETECTDATE, also specifies the explicit data format to recognize in character input host variables.

Syntax

DATE={ODBC | ISO | USA | EUR | JIS}

Parameters:

ODBC
yyyy-mm-dd (ISO 8601 default format)
ISO
yyyy-mm-dd (mainframe default format)
USA
mm/dd/yyyy
EUR
dd.mm.yyyy
JIS
yyyy-mm-dd

Properties:

Default: ODBC (ISO 8601 default format)

Dependencies:

For input host parameters, requires that the DETECTDATE SQL compiler directive option is also set.

Scope:

Used at compile time: Yes
Behavior at run time: Source file

See Scope - OpenESQL SQL Compiler Directive Options for more information.

Comments:

DATE can be used with the DATEDELIM directive to specify an alternative delimiter that separates day, month, and year components.

DATE, with or without DATEDELIM, changes the display format of output host variables as specified.

When you specify both DATE and DETECTDATE, OpenESQL uses DATE (with or without DATEDELIM) to also recognize date values in your input host variables. See DETECTDATE for more information.

Important: If you do not specify an alternative format using DATE, OpenESQL returns your date columns using the ISO 8601 default format in your output character host variables, as specified in the Properties section of this topic. The same is also true of input character host variables when DETECTDATE is specified in addition to DATE.