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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Apr 2004
    Posts
    682
    Thanks
    24
    Thanked 1 Time in 1 Post

    Getting the unix time from a date?

    Hey guys.. is there anyway I could get the unix time (time()) from a date like this for example: June 28, 2005 10pm ET or something similar at least?

    I've looked into mktime() but not sure if I really understand it all or if this is what it is for?

    Thanks!

  • #2
    Regular Coder
    Join Date
    Jun 2005
    Posts
    804
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Check into strtotime().

  • #3
    Regular Coder
    Join Date
    Apr 2004
    Posts
    682
    Thanks
    24
    Thanked 1 Time in 1 Post
    Thanks I'll check it out!

  • #4
    Regular Coder
    Join Date
    Apr 2004
    Posts
    682
    Thanks
    24
    Thanked 1 Time in 1 Post
    Is there a similar function to get a MYSQL timestamp (YYYYMMDDHHMMSS) from a string such as "June 28, 2005 10pm ET"?

    Cheers!

  • #5
    Regular Coder
    Join Date
    May 2005
    Posts
    563
    Thanks
    0
    Thanked 3 Times in 3 Posts
    PHP Code:
    date("YmdHis",strtotime("June 28, 2005 10pm ET")); 


  •  

    Posting Permissions

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