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. Advertising

  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. Advertising

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:
    30,818
    ersecchio
    Jan 12, 2010
  2. thinktwice
    Replies:
    4
    Views:
    945
    =?iso-8859-1?q?Kirit_S=E6lensminde?=
    Sep 7, 2006
  3. Amit Khemka
    Replies:
    1
    Views:
    1,481
    Paul Boddie
    Mar 13, 2007
  4. FPGA
    Replies:
    5
    Views:
    1,322
    Thomas Stanka
    Jan 8, 2008
  5. Elliott
    Replies:
    3
    Views:
    336
    Daniel Berger
    Jun 22, 2005
Loading...

Share This Page