AV1611 Posted March 29, 2006 Share Posted March 29, 2006 itdatshta.`it_date` >= {d '2006-02-28'} AND itdatshta.`it_date` <= {d '2006-03-28'}need the two dates in this snippet of php/sql to be todays date and the date from 90 days earlierhere's a starting point...???$today="{d '".date('Y-m-d')."'}";$90day= Link to comment https://forums.phpfreaks.com/topic/6117-backdating-by-90-days/ Share on other sites More sharing options...
kanikilu Posted March 29, 2006 Share Posted March 29, 2006 90 days prior to today would be:[code]$ninetyDay=date('Y-m-d', strtotime('-90 days'));[/code]Note: I changed the variable name because you can't start a variable with a number (e.g. $90day) Link to comment https://forums.phpfreaks.com/topic/6117-backdating-by-90-days/#findComment-22052 Share on other sites More sharing options...
AV1611 Posted March 29, 2006 Author Share Posted March 29, 2006 I knew that about the number... it was an illustration...thanks for the answer... Link to comment https://forums.phpfreaks.com/topic/6117-backdating-by-90-days/#findComment-22064 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.