Hi All,
I have data that has date and times info like so:
1/21/2012 2:56:58AM
1/21/2012 3:09:32PM
I can use mktime_t to convert this to a time_t value I think (after chopping the data into the correct chunks). The only thing is the AM and PM formatting. mktime_t would want the input in military format I believe. Does anyone have any handy code snippets for converting 12hour time formats to 24hour?
Thanks,
I have data that has date and times info like so:
1/21/2012 2:56:58AM
1/21/2012 3:09:32PM
I can use mktime_t to convert this to a time_t value I think (after chopping the data into the correct chunks). The only thing is the AM and PM formatting. mktime_t would want the input in military format I believe. Does anyone have any handy code snippets for converting 12hour time formats to 24hour?
Thanks,
Comment