Reputation: 23
If I have a date such as 10/10/10, how do I display the date (in date format) 2 weeks after that? I think it has to do with strtotime
, but I don't know how to write it. I'm looking at the php.net site and can't figure it out.
Upvotes: 2
Views: 1210
Reputation: 49421
I'm not 100% what you need, but we'll give it a try:
$defaultTime = strtotime('+2 week',strtotime('10/10/10'));
Upvotes: 1
Reputation: 283043
Try this
date('y/m/d', strtotime('+2 weeks', strtotime('10/10/10')));
Upvotes: 4