#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    27
    Rep Power
    0
    Hi:

    I need to show the last time a file has been modified, and filemtime() only shows the number of seconds since Jan. 1, 1970...

    Is there a function to output this as a real date (dd-mm-yyyy) ??

    Thanks
    //ryan
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    23
    Rep Power
    0
    With the getdate() function ofcourse.

    example:
    $current_date= getdate(time());
    echo $current_date["hours"]; etc.

    you have:
    hours
    mday
    minutes
    mon
    month
    seconds
    wday
    weekday
    yday
    year


    Check PHP manual at www.php.net

    Mzzls
    Dave
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    Or, if you're feeling extra lazy, use date().

    eg;
    echo date("dd/mm/yy h:ia",filemtime(filename));


    ------------------
    To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson

Similar Threads

  1. Changing date from date ("Ymd");
    By byte me in forum PHP Development
    Replies: 13
    Last Post: September 28th, 2006, 07:34 AM
  2. output every month, year between 2 dates
    By martincrumlish in forum PHP Development
    Replies: 2
    Last Post: February 2nd, 2004, 07:52 AM
  3. database date selection problem
    By kidsleep in forum MySQL Help
    Replies: 0
    Last Post: January 31st, 2004, 10:50 AM
  4. Making PHP output whatever it has processed so far?
    By wordracr in forum PHP Development
    Replies: 3
    Last Post: January 17th, 2004, 10:26 AM
  5. subquery for date not working
    By xsarpedonx in forum MySQL Help
    Replies: 4
    Last Post: December 18th, 2003, 11:58 PM

IMN logo majestic logo threadwatch logo seochat tools logo