Hi,
So you have a string with time in some format and want to convert to number of seconds?
Maybe code like below is what you need?
See global functions for date, time related functions in Origin C:
http://ocwiki.originlab.com/index.php?title=Category:Date_Time_%28global_function%29
Easwar
OriginLab
void str_to_sec()
{
// String containing time
string strTime = "001:12:00:00.0"; // 1 day, 12 hrs, 0 mins, 0 secs
// Convert time string to julian value
double dTime = str_to_time(strTime);
printf("Julain value of %s = %f\n", strTime, dTime);
// Can multiply julian value by number of seconds in a day to get seconds
const int NSECS_PER_DAY = 24*60*60;
printf("Number of seconds= %f\n", dTime * NSECS_PER_DAY);
}