Times can be stored as separate integers for the hours, minutes, and seconds. To convert a time string to its integer components, use the time to numbers function, time_tonums():
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The time string is broken into the three sub-strings defined by the format string. Each of these is converted to an integer value and checked that it is the valid range for that component. The integers are copied to the variables pointed to in the call. time_tonums() expects pointers to these variables in the call.
To convert the integer components of a time into a time string, call the time from numbers function, time_frnums():
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|