TutTimeStrToNum


Name

TutTimeStrToNum — convert a string time to a number using the Time_Format option

Synopsis

T_BOOL TutTimeStrToNum(time_str, time_num_return) 
T_STR time_str; 
T_REAL8 *time_num_return; 

Arguments

time_str — string time value to be converted to a number

time_num_return — pointer to store converted time number

Return Values

TRUE if time_str successfully converted, FALSE otherwise.

Diagnostics

None

Description

TutTimeStrToNum is a convenience function that converts a string time value to its numeric representation. TutTimeStrToNum uses the value of the option Time_Format to determine which time converter to use and then calls TutTimeCvtStrToNum with the appropriate converter.

Caution

If TutTimeStrToNum returns FALSE, it does not put anything in time_num_return.

See Also

TutTimeCvtStrToNum, TutTimeNumToStr

Examples

This example gets a a time string and converts it to a time number:

T_STRING time_str; 
T_REAL8 time_num; 
if (gets(time_str) && TutTimeStrToNum(time_str, &time_num)) { 
  TutOut("Time: string %s, number %f\n", time_str, time_num); 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com