Subtract two weeks from GETDATE.
Posted on 2007-03-26
So I have the below query and I want to return a date but take it two weeks back so if the date taken is 3/26/2007 the date value used is 3/12/06. How may I accomplish this task?
select intBranchID, txtOrderSubType, sum(mnyActivityLaborPay + mnyLaborRevenue)
where dteActualEndDate between SUBTRACT TWO WEEKS BACK (GETDATE)
group by intBranchID, txtOrderSubType