Jump to content

date function plus a week


dc_jt

Recommended Posts

because it was

$newDate = date("Y-m-d  H:i:s", $timeStamp); earlier

 

I just editted it. to

$newDate = date("d/m/Y  H:i:s", $timeStamp);

 

I think you used previous one.. have a look at that...

 

Thanks, you were right, however I have to have it in Y-m-d  H:i:s format because I have a calendar which works in this format. Is it possible doing it this way?

 

Thanks

you can change the format to which suits you...

 

by changing

date("d/m/Y  H:i:s", $timeStamp);

the heighlited ...

 

 

When I change the format though I get 10/1/2007

 

Im using this:

 

$due = date('d/m/Y H:i:s');

$timeStamp = strtotime($due);

$timeStamp += 24 * 60 * 60 * 7; // (add 7 days)

$newDate = date("d/m/Y H:i:s", $timeStamp);

echo $newDate;

 

???

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.