Previous Topic Next topic Print topic


DATE

Specifies the explicit date format to use when date values are returned from SQL Server date columns in character output host variables.
Restriction: This topic applies to Windows environments only.

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

Restriction: This topic documents DATE as used as an HCOSS SQL compiler directive option and therefore assumes that you have set DIALECT=MAINFRAME. For information on using DATE as a generic SQL compiler directive option, see DATE under SQL Compiler Directive Options. For information on the DIALECT HCOSS SQL compiler directive option, see DIALECT.

Syntax

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

Parameters:

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

Properties:

Default: ISO (mainframe default format)

Dependencies:

To use DATE, you must also set DIALECT=MAINFRAME.

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

Scope:

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

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

Comments:

DATE changes the display format of output host variables as specified.

Note: If you do not specify an alternative format using DATE, HCOSS returns your SQL Server date columns using mainframe ISO format in your output character host variables by default, as specified in the Properties section of this topic.

When you specify both DATE and DETECTDATE, HCOSS uses DATE to recognize date values in your input host variables. See DETECTDATE for more information.

Previous Topic Next topic Print topic