![]() |
help me figure out this date thing
i created this application where a user signs up for something what i want to do is the second the user signs up the date that is inserted into the db is 3 weeks ahead of the signup date for example.
if i signed up on the application todays date would be 9/14/2008 and the date that is inserted into the database would be 10/5/2008 (which is 3 weeks ahead of the sign up date) how would this be codded??? thanks |
|
|
PHP Code:
|
Amazing! I never knew it was this easy to find future/previous dates and times!
|
Looking forwards, with more recent versions of PHP (5.3 I think) we can make use of the
DateTime and DateInterval objects. For example, to add three weeks we could do the following:PHP Code:
|
| All times are GMT. The time now is 11:06 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0