问题
suppose I have a string "2011-08-21 21:48:45 +1200",and another one with the same format,
I want to compare these 2 strings to find out which one is the early one or later one,
is there a easy way to convert a string to time format rather than compare them by characters?
Thanks
回答1:
use getdate or strptime().
来源:https://stackoverflow.com/questions/7524543/convert-a-string-in-to-time-format-in-c