Jump to content


Photo

backdating by 90 days


  • Please log in to reply
2 replies to this topic

#1 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 29 March 2006 - 06:50 PM

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 earlier

here's a starting point...???

$today="{d '".date('Y-m-d')."'}";
$90day=

#2 kanikilu

kanikilu
  • Members
  • PipPip
  • Member
  • 29 posts
  • LocationDallas, TX

Posted 29 March 2006 - 07:02 PM

90 days prior to today would be:

$ninetyDay=date('Y-m-d', strtotime('-90 days'));
Note: I changed the variable name because you can't start a variable with a number (e.g. $90day)

#3 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 29 March 2006 - 07:44 PM

I knew that about the number... it was an illustration...
thanks for the answer...





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users