Jump to content

Something wrong with date format


marukochan

Recommended Posts

why do want to print previous year date?

 

$todaysDate=date("Y-m-d");

 

then use mktime php function to + or - to get the date you want.

 

for example,

 

$yesterday=date("Y-m-d",mktime(0,0,0,$month,$day-1,$year));

 

regards,

chai

 

 

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.