jigsawsoul Posted April 2, 2010 Share Posted April 2, 2010 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..! Quote Link to comment Share on other sites More sharing options...
Garethp Posted April 2, 2010 Share Posted April 2, 2010 $Now = time(); $SixDays = 1 * 60 * 60 * 24 * 6; $Wanted = $Now + $SixDays; $Wanted = date("d/m/Y", $Wanted); Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 2, 2010 Share Posted April 2, 2010 //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 Quote Link to comment Share on other sites More sharing options...
jigsawsoul Posted April 2, 2010 Author Share Posted April 2, 2010 $Now = time(); $SixDays = 1 * 60 * 60 * 24 * 2; $Wanted = $Now + $SixDays; $Wanted = date("d/m/Y", $Wanted); is the above correct if i only want to add two days? Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 2, 2010 Share Posted April 2, 2010 Yes. It is correct. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.