﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / SQL query 4 weeks 3 business days / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 13:06:18 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SQL query 4 weeks 3 business days</title><link>http://www.sqlservercentral.com/Forums/Topic1429340-391-1.aspx</link><description>[quote][b]David Mando (3/11/2013)[/b][hr]Thanks so much for your quick response.How would I write this query if it is just (- 4 weeks and 3 days)?[/quote]select dateadd(day, -3, dateadd(week,-4,getdate()));</description><pubDate>Mon, 11 Mar 2013 17:09:48 GMT</pubDate><dc:creator>ScottPletcher</dc:creator></item><item><title>RE: SQL query 4 weeks 3 business days</title><link>http://www.sqlservercentral.com/Forums/Topic1429340-391-1.aspx</link><description>Calendar weeks or working weeks? What is your definition of a week? Is it Monday To Friday? Is it Monday to Sunday? Is it Sunday to Saturday? Or  may be even (as in some middle-east countries) Saturday to Wednesday?</description><pubDate>Mon, 11 Mar 2013 09:53:53 GMT</pubDate><dc:creator>Eugene Elutin</dc:creator></item><item><title>RE: SQL query 4 weeks 3 business days</title><link>http://www.sqlservercentral.com/Forums/Topic1429340-391-1.aspx</link><description>Thanks so much for your quick response.How would I write this query if it is just (- 4 weeks and 3 days)?</description><pubDate>Mon, 11 Mar 2013 09:46:00 GMT</pubDate><dc:creator>DaveDB</dc:creator></item><item><title>RE: SQL query 4 weeks 3 business days</title><link>http://www.sqlservercentral.com/Forums/Topic1429340-391-1.aspx</link><description>[quote][b]David Mando (3/11/2013)[/b][hr]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[/quote]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 :-)!).</description><pubDate>Mon, 11 Mar 2013 09:29:28 GMT</pubDate><dc:creator>Eugene Elutin</dc:creator></item><item><title>SQL query 4 weeks 3 business days</title><link>http://www.sqlservercentral.com/Forums/Topic1429340-391-1.aspx</link><description>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</description><pubDate>Mon, 11 Mar 2013 09:19:51 GMT</pubDate><dc:creator>DaveDB</dc:creator></item></channel></rss>