Struggling to convert a mysql datetime object to a python string of a different format

Corey Richardson kb1pkl at aim.com
Thu Feb 24 10:53:21 CET 2011


On 02/24/2011 04:34 AM, rahul mishra wrote:
> try this 
> 
> test = time.time(2011, 2, 1, 2, 4, 10)
> # this is your datetime object from mysql
> 
> print time.mktime(test.timetuple())
> 
> hope this would help you
> 
> 

You do realize that email was sent over four months ago, correct?
See:

>> On Wednesday, August 04, 2010 7:40 PM ????? wrote:

-- 
Corey Richardson



More information about the Python-list mailing list