Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   converting string to time (http://www.go4expert.com/forums/converting-string-time-t21906/)

answerme 27Apr2010 12:55

converting string to time
 
have a string "072455.00" this represents UTC time
How should i convert this particular string to time

davidk 27Apr2010 13:15

Re: converting string to time
 
I guess it means 07:24:55.

To convert your string into time:
1. take by 2 characters from the string: hours, minutes and seconds
2. convert them into numbers
3. use 'struct tm' and 'mktime()' of time.h header


All times are GMT +5.5. The time now is 00:44.