SQL to C conversion for time data
You can convert the time SQL data type, SQL_TYPE_TIME, into a C data type.
The following table shows information about converting time SQL data to C data.
| fCType | Test | rgbValue | pcbValue | SQLSTATE |
|---|---|---|---|---|
| SQL_C_CHAR | cbValueMax >= 9 | Data | 8 | 000001 |
| cbValueMax < 9 | Untouched | 8 | 22003 | |
| SQL_C_WCHAR | cbValueMax >= 18 | Data | 16 | 000001 |
| cbValueMax < 18 | Untouched | 16 | 22003 | |
| SQL_C_TYPE_TIME | None2 | Data | 63 | 000001 |
| SQL_C_TYPE_TIMESTAMP | None2 | Data4 | 163 | 000001 |
SQL_C_TYPE_
TIMESTAMP_EXT![]() |
None2![]() |
Data5![]() |
203![]() |
000001![]() |
| Notes:
|
||||
When the time SQL data type is converted to the character C data type, the resulting string is in the "hh:mm:ss” format.

