How to convert the date object 2010-11-10 14:52:35.026000 to integer?

Zeynel azeynel1 at gmail.com
Wed Nov 10 10:40:37 EST 2010


mDATE = "2010-11-10 14:52:35.026000"

(Not sure if this is string or something else.)

I would like to convert mDATE to integer to add, multiply etc.

For instance, if I try to convert mDATE to seconds

td = mDATE.seconds

I get the error

    td = result.mDATE.seconds
AttributeError: 'datetime.datetime' object has no attribute 'seconds'


Thanks.



More information about the Python-list mailing list