
TX/MAM Database Protocol Manual - document version: 2.2 – Page 30
10. Date & time functions
Use following functions to work with the time and date formats as used in Cobalt.
10.1 Converting a Cobalt time field to two strings containing resp. the
time and date part
int cob_msec_to_timedate( long long time_date_msec, char *time, char *date );
Parameters
The Cobalt time field to convert.
The time part as a string, e.g. "13:00:00:00".
The date part as a string, e.g. "2006-10-06".
Result
The result of the function is an integer that can have following values:
Success, the time could be converted.
Failure, the time could not be converted.
Example
Converting a start time to human readable format:
cob_msec_to_timedate( mainevent_datetime, time, date );
printf( "Main Event starts at %s,
%s", time, date );
Kommentare zu diesen Handbüchern