import time t = time.ctime()
For me at the moment, t is \'Sat Apr 21 11:58:02 2012\'. I have more data like this.
t
\'Sat Apr 21 11:58:02 2012\'
Try datetime.strptime().
datetime.strptime()
See: http://docs.python.org/library/datetime.html#datetime.datetime.strptime