Hi I am saving the date in the database as expiry date e.g "2007-6-25" and in my email i want to send one day back date for payment, for this date it is "2007-6-24" , I did it by "day - 1" but it cause prablem for dates that are expired on 1. This make 1 to 0 and not 31 or 30. Is there any query that gives me one day back date. plz help mee.
Can you post the code you're currently using? Maybe something like: $one_day_back = strtotime('-1 Day', strtotime($original_date)); PHP: Would work... Or are you doing that with SQL alone?
How about: $yesterday = date("Y-m-d", time()-60*60*24); PHP: Then query select "day = '$yesterday'" Edit: .
$yesterday = date("Y-m-d", strtotime('-1 Day',"2007-6-25")); PHP: Ha __________________ Rep is used for good answers.