Possible Duplicate:
Parse date and format it using python?
I'm very new to Python. I have the following two strings :
Mon, 29 Oct 2012 13:07:07 GMT
2012-10-29 12:57:08
I wish there could be any date parsing lib available in python which does parse the above two strings to something like this:
2012-10-29 12:57:08
So that I can compare them. Note that the comparison should be able to produce the result like integer comparison. Like 1
is less than 2
, so the same way 2012-10-29 12:57:08
is less than 2012-10-29 13:57:08
Are there any easy to do so in python?
Thanks in advance.