i would like to calculate the date from now to -7 days. i tried the following:
$currentdate= date("Y-m-d"); $lastweekdate= date_sub("$currentdate",INTERVAL 7 DAYS);
any idea why it doesn`t work (ok, im a rookie)
thanks werner
hi, try <?php $a_week_ago=date("Y-M-d", time()-72460*60); ?>
PM
Something like date('Y-m-d',strtotime('1 week ago')); perhaps?
thanks - works fine now !