DateTimeResults

Specifies the Open Client and Open Server datatype to which a DB2 access service converts DB2 TIMESTAMP results.

Syntax

DateTimeResults=[datetime | datetime4 | char_iso | char_usa | char_eur | char_jis | char_odbc]

Default

datetime

Values

datetime returns CS_DATETIME, an 8-byte datetime datatype with a range of legal values from January 1, 1753, to December 31, 9999, and a precision of 1/300th of a second (3.33 milliseconds).

datetime4 returns CS_DATETIME4, a 4-byte datetime datatype with a range of legal values from January 1, 1900, to June 6, 2079, and a precision of 1 minute.

char_iso returns CS_CHAR, character data in the format yyyy-mm-dd-hh.mm.ss.nnnnnn.

char_usa returns CS_CHAR, character data in the format mm/dd/yyyy hh:mm [AM | PM].

char_eur returns CS_CHAR, character data in the format dd.mm.yyyy hh.mm.ss.

char_jis returns CS_CHAR, character data in the format yyyy-mm-dd hh:mm:ss.

char_odbc returns CS_CHAR, character data in the format yyyy-mm-dd hh:mm:ss.nnnnnn.

Comments

You can convert DB2 TIMESTAMP to one of the character formats to retain more precision. CS_DATETIME has less precision (1/300ths of a second) than TIMESTAMP (millionths of a second).