SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2010
    Posts
    455
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Seconds Into Timestamp

    Is there a php function what will turn "time()+3600" into a YYYY-MM-DD HH:MM:SS timestamp? I've been through the manual's and nothing stuck-out.

  2. #2
    SitePoint Member
    Join Date
    Feb 2010
    Location
    Arkansas, USA
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    date("Y-m-d H:m:s"time()+3600); 
    Look at PHP's date() function. It's priceless!

  3. #3
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    73 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by drjamescook View Post
    PHP Code:
    date("Y-m-d H:m:s"time()+3600); 
    Look at PHP's date() function. It's priceless!
    Almost.

    Y-m-d H:i:s (You put month in for minutes. common mistake. )

  4. #4
    SitePoint Member
    Join Date
    Feb 2010
    Location
    Arkansas, USA
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Whoops! My bad. That's what I get for doing it off the top of my head!

  5. #5
    SitePoint Evangelist
    Join Date
    Jun 2010
    Posts
    455
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Then there's hope for me yet! Thanks drjamescook and StarLion for you help I was looking at the answer, but couldn't see it without your help.


Bookmarks

Posting Permissions

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