Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2007
    Posts
    571
    Thanks
    25
    Thanked 28 Times in 28 Posts

    Change Unix Timestap to readible

    Hey,

    I have the following code:

    PHP Code:
            $timestamp $row['last_seen'];
            
    $curtime time();
            
    $lastSeen $curtime $timestamp;
            echo 
    $lastSeen
    Now only problem is that $lastSeen counts up in seconds, so instead of going to 1:00 mins it goes to 61secs.

    Does anyone know of a way to display this time in a more user friendly fashion?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,538
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts

  • #3
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The date() function also works excellently, there is a link to it on that page.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •