David Mando (3/11/2013)
Hello,I need to write a query that returns a result set that is within the past 4 weeks and 3 business days. For example, the result set for today would return everything from Feb 6th forward. (Date of this post was March 11).
I have the second part but I am not sure how to include the 3 days. Any help would be appreciated.
select dateadd(week,-4,getdate());
-Dave
4 calendar weeks Monday to Friday is possible but for "3 business days" you will need a calendar table, as there is no universal definition for the "business day". For example, today, 11th March 2013, is business day in UK, but bank holiday in Victoria - state of Australia (local 1st May :-)!).