Show pageOld revisionsBacklinksExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== PHP datetime ====== <code php> $EndDate = date_create(%MYSQL DATETIME FORMAT%); date_add($EndDate,new DateInterval('P7D')); //Add 7 days $Now = date_create(date('Y-m-d H:i:s')); //$DiffDate = date_diff($Now,$EndDate); //Returns larger-than-zero integer //echo $DiffDate->format('%d'); if ($EndDate>$Now) { $Larger=true; } else { $Larger=false; } </code> development/php/date.txt Last modified: 2019/10/31 09:04by 127.0.0.1