Link to home
Start Free TrialLog in
Avatar of Levi Martin
Levi MartinFlag for United States of America

asked on

Subtract two weeks from GETDATE.

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)
from tblSiebelComplete1000
where dteActualEndDate between SUBTRACT TWO WEEKS BACK (GETDATE)
group by intBranchID, txtOrderSubType
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial