converting epoch time to string (and vice versa)

Discussion in 'Python' started by Astan Chee, Mar 13, 2007.

  1. Astan Chee

    Astan Chee Guest

    Hi,
    I have a string in this format "DD/MM/YYY" for example:
    tdate = "18/01/1990"
    and Im trying to convert this to epoch time, can anyone help?
    Im also trying to convert that epoch time to the string format
    previously. Can anyone help this one too?
    Thanks!
    Astan
     
    Astan Chee, Mar 13, 2007
    #1
    1. Advertisements

  2. Astan Chee

    Paul McGuire Guest

    On Mar 13, 12:42 am, Astan Chee <> wrote:
    > Hi,
    > I have a string in this format "DD/MM/YYY" for example:
    > tdate = "18/01/1990"
    > and Im trying to convert this to epoch time, can anyone help?
    > Im also trying to convert that epoch time to the string format
    > previously. Can anyone help this one too?
    > Thanks!
    > Astan


    Read up on time.strftime() (_F_ormats a time to a string of various
    styles) and time.strptime() (_P_arses a string of various formats into
    a time).

    -- Paul
     
    Paul McGuire, Mar 13, 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. carmen
    Replies:
    4
    Views:
    31,397
    ersecchio
    Jan 12, 2010
  2. Flyingaway
    Replies:
    6
    Views:
    23,140
    Jack Klein
    Feb 19, 2005
  3. thinktwice
    Replies:
    4
    Views:
    1,140
    =?iso-8859-1?q?Kirit_S=E6lensminde?=
    Sep 7, 2006
  4. Amit Khemka
    Replies:
    1
    Views:
    1,588
    Paul Boddie
    Mar 13, 2007
  5. Replies:
    3
    Views:
    9,270
  6. FPGA
    Replies:
    5
    Views:
    1,507
    Thomas Stanka
    Jan 8, 2008
  7. deepak
    Replies:
    1
    Views:
    874
    bruce barker
    Feb 8, 2008
  8. Elliott
    Replies:
    3
    Views:
    459
    Daniel Berger
    Jun 22, 2005
Loading...