Various strings to dates.
Amy G
amy-g-art at cox.net
Fri Jan 23 15:41:39 EST 2004
I have seen something about this beofore on this forum, but my google search
didn't come up with the answer I am looking for.
I have a list of tuples. Each tuple is in the following format:
("data", "moredata", "evenmoredata", "date string")
The date string is my concern. This is the date stamp from an email.
The problem is that I have a whole bunch of variations when it comes to the
format that the date string is in. For example I could have the following
two tuples:
("data", "moredata", "evenmoredata", "Fri, 23 Jan 2004 00:06:15")
("data", "moredata", "evenmoredata", "Thursday, 22 January 2004 03:15:06")
I know there is some way to use the date string from each of these to get a
date usable by python, but I cannot figure it out.
I was trying to use time.strptime but have been unsuccesful thus far.
Any help is appreciated.
More information about the Python-list
mailing list