The timestamp SQL data type is:
Table 207. Converting Timestamp SQL Data to C Data
fCType | Test | rgbValue | pcbValue | SQLSTATE | ||
---|---|---|---|---|---|---|
SQL_C_CHAR | Display size < cbValueMax | Data | Length of data | 00000 | ||
19 <= cbValueMax <= Display size | Truncated Data b | Length of data | 01004 | |||
cbValueMax < 19 | Untouched | Length of data | 22003 | |||
SQL_C_DATE | None a | Truncated data c | 6 e | 01004 | ||
SQL_C_TIME | None a | Truncated data d | 6 e | 01004 | ||
SQL_C_TIMESTAMP | None a | Data | 16 e | 00000 | ||
SQLSTATE 00000 is not returned by SQLError(), rather it is indicated when the function returns SQL_SUCCESS. |
When the timestamp SQL data type is converted to the character C data type, the resulting string is in the "yyyy-mm-dd hh:mm:ss[.fff[fff]]" format (regardless of the precision of the timestamp SQL data type).