Jump to content

Add 24 hours to current date


HardCoreMore

Recommended Posts

Hi i am havin a problem. I can print current date to browser with this script without problem :

 

$date = getdate ( time());

$currentDate = $date ['year']."-".$date['mon']."-". $date['mday']." ". $date ['hours'] .":".$date['minutes'].":". $date['seconds'];

print $currentDate;

 

But how can i add just 24 hours to the $currentDate or subtract 24 hours;

 

Any idea?

Link to comment
https://forums.phpfreaks.com/topic/100544-add-24-hours-to-current-date/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.