Jump to content

Adding Six Day's To The Current Date????!!!


jigsawsoul

Recommended Posts

I'm having problems knowing where to start, the delivery date on my website will be, 6 days from the current date..

 

How would i get todays date, the add six day's to that date and display the new date..???

 

If you understand at all what i mean.. thanks for any help..!

 

:-[

 

Link to comment
https://forums.phpfreaks.com/topic/197356-adding-six-days-to-the-current-date/
Share on other sites

//Garethp's code with comments

$Now = time(); //Current timestamp
$SixDays = 1 * 60 * 60 * 24 * 6; // 1 x 60seconds x 60minutes x 24 hours x 6 days = seconds in 6 days
$Wanted = $Now + $SixDays; //Adding seconds in 6 days onto current time stamp
$Wanted = date("d/m/Y", $Wanted); //Creating it in date format

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.