ST_CTIME convert to yyyymmdd

Discussion in 'Python' started by Hitesh, Aug 7, 2006.

  1. Hitesh

    Hitesh Guest

    Hi,

    Any hint on converting time from ST_CTIME secs into yyyymmdd format?
    sorry for one-liner stupid question.. I couldn;t find (or rather figure
    out) in docs.

    Thank you,
    hj
     
    Hitesh, Aug 7, 2006
    #1
    1. Advertising

  2. Hitesh

    Hitesh Guest

    All right I got it. Thank you anyway...

    create_date = os.stat(pathname)[ST_CTIME]
    print time.strftime("%Y%m%d", time.gmtime(create_date))

    Hitesh wrote:
    > Hi,
    >
    > Any hint on converting time from ST_CTIME secs into yyyymmdd format?
    > sorry for one-liner stupid question.. I couldn;t find (or rather figure
    > out) in docs.
    >
    > Thank you,
    > hj
     
    Hitesh, Aug 7, 2006
    #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. Andreas Klemt
    Replies:
    1
    Views:
    405
    Karl Seguin
    Jul 23, 2003
  2. Phil Hanna
    Replies:
    3
    Views:
    15,475
    Keeger
    Jul 1, 2003
  3. Konstantinos Pachopoulos

    find difference in days from YYYYMMDD to YYYYMMDD

    Konstantinos Pachopoulos, Sep 22, 2007, in forum: Python
    Replies:
    5
    Views:
    322
  4. alberttresens
    Replies:
    3
    Views:
    651
    Thomas Jollans
    Jul 26, 2010
  5. Alan Gresley

    With YYYYMMDD Trying to change MM to August

    Alan Gresley, Feb 18, 2008, in forum: Javascript
    Replies:
    7
    Views:
    140
    Thomas 'PointedEars' Lahn
    Feb 22, 2008
Loading...

Share This Page