943,708 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2215
  • PHP RSS
Nov 13th, 2007
0

php date function

Expand Post »
How can I get future date by php date() function, for example today is 11/13/2007, I want to get the date after 60 days.

Any advice will be appreciated.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
michael123 is offline Offline
93 posts
since Jun 2005
Nov 13th, 2007
0

Re: php date function

You need to use strtotime().
Moderator
Reputation Points: 161
Solved Threads: 38
He's No Good To Me Dead
stymiee is offline Offline
1,422 posts
since May 2006
Nov 16th, 2007
0

Re: php date function

PHP Syntax (Toggle Plain Text)
  1. <?php
  2.  
  3. echo 'Now: '. date('Y-m-d') ."\n";
  4.  
  5. echo 'After 60 days : '. date('Y-m-d', strtotime('+60 days')) ."\n";
  6.  
  7. ?>
Reputation Points: 59
Solved Threads: 12
Junior Poster
MitkOK is offline Offline
142 posts
since Jul 2007
Nov 16th, 2007
0

Re: php date function

You can also use mysql functions as well.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: php syntax error display..
Next Thread in PHP Forum Timeline: php reading a text file ..... help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC