isc_decode_sql_time()
Go Up to API Function Reference
Translates a time from InterBase ISC_TIME format into the C struct tm format.
Syntax
void isc_decode_sql_time(
ISC_TIME *ib_time,
void *tm_date);
| Parameter | Type | Description |
|---|---|---|
|
|
|
Pointer to a four-byte |
|
|
|
Pointer to a C |
Description
isc_decode_sql_time() translates a time retrieved from a table and stored in an ISC_TIME variable, ib_time, into a C time structure for program manipulation. Both ib_time and tm_date must be declared and initialized before use.
Use the isc_dsql family of API calls to retrieve InterBase TIME data from a table into the ISC_TIME structure prior to translation.
- Note: isc_decode_sql_time() does not support milliseconds, because encode/decode functions use the structure struct tm from
time.h, which does not support a fractional part for seconds.
Example
The following code fragment illustrates declaring time structures and calling isc_decode_sql_time() to translate an InterBase date format into a C time format:
#include <time.h> #include <ibase.h> . . . struct tm hire_time; ISC_TIME hire_date; . . . /* Retrieve TIME data from a table here. */ . . . isc_decode_sql_time(&hire_date, &hire_time);
Return value
None.