Convert from/to struct_time

Discussion in 'Python' started by Florian Lindner, Apr 22, 2007.

  1. Hello,
    I have a struct_time and a datetime object and need compare them. Is there
    any function that converts either of these two to another?

    Thanks,

    Florian
     
    Florian Lindner, Apr 22, 2007
    #1
    1. Advertisements

  2. Florian Lindner schrieb:
    > Hello,
    > I have a struct_time and a datetime object and need compare them. Is there
    > any function that converts either of these two to another?



    datetime.datetime(*time.localtime()[:6])

    Diez
     
    Diez B. Roggisch, Apr 22, 2007
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Klemt
    Replies:
    1
    Views:
    562
    Karl Seguin
    Jul 23, 2003
  2. Jaap
    Replies:
    4
    Views:
    907
    John O'Conner
    Jul 10, 2006
  3. Klaus Neuner
    Replies:
    7
    Views:
    790
    Klaus Neuner
    Jul 26, 2004
  4. sck10
    Replies:
    4
    Views:
    16,382
    daniel
    Sep 3, 2006
  5. Replies:
    5
    Views:
    2,165
    Wesley Hall
    Nov 4, 2006
  6. Harlin Seritt
    Replies:
    29
    Views:
    1,472
    Paul Rubin
    Feb 24, 2007
  7. Samuel R. Neff
    Replies:
    0
    Views:
    1,261
    Samuel R. Neff
    Jan 2, 2008
  8. Ulrich Eckhardt

    modifying a time.struct_time

    Ulrich Eckhardt, Dec 16, 2011, in forum: Python
    Replies:
    8
    Views:
    1,132
    Chris Angelico
    Dec 24, 2011
Loading...