Question: Convert datetime to long number

John Smith JohnSmith at obfs.com
Sat May 24 22:05:37 EDT 2003


HI,
  A probably very simple question. How do I convert a datetime object to the
long number.
I mean if I do

>>> x=datetime.utcnow(); a=time.time()
>>> x,a
(datetime.datetime(2003, 5, 25, 2, 2, 32, 540000), 1053828152.54)
>>>

what function f I can apply to x such that  f(x) will return 1053828152.54 ?

Thanks.






More information about the Python-list mailing list