Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 2 of 2

This is a discussion on converting date to timestamp? in the Shared & Semi-Dedicated forum
Is it possible to convert a date like 20 Dec 2001 to a timestamp? if so, how? I figured that'd be the easiest way to ...

  1. #1
    Smo
    Smo is offline
    JPC Addict
    Join Date
    Nov 2002
    Location
    Finland
    Posts
    218

    Question converting date to timestamp?

    Is it possible to convert a date like 20 Dec 2001 to a timestamp?

    if so, how?

    I figured that'd be the easiest way to count days..

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Yes, check out the very cool strtotime() function. You can pass it virtually any English string and it will return a timestamp. You can even use it to do your count automatically as in:

    strtotime("20 Dec 2001 + 30 days");

    Enjoy!

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

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
  •