﻿<?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  / How to first date of the previous Quater of the given date. / 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>Thu, 23 May 2013 03:31:53 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How to first date of the previous Quater of the given date.</title><link>http://www.sqlservercentral.com/Forums/Topic1404621-391-1.aspx</link><description>Thanks Friends!It works  for  me.</description><pubDate>Wed, 09 Jan 2013 04:07:34 GMT</pubDate><dc:creator>avdhut.k</dc:creator></item><item><title>RE: How to first date of the previous Quater of the given date.</title><link>http://www.sqlservercentral.com/Forums/Topic1404621-391-1.aspx</link><description>I agree with Anthony... a calendar table is probably a better idea, but this should get you the first day of the previous quarter.[code="sql"]declare @d datetimeset @d = getdate() -- or whatever date you want to testselect DATEADD(quarter,DATEDIFF(quarter,0,@d)-1,0)[/code]</description><pubDate>Wed, 09 Jan 2013 03:54:22 GMT</pubDate><dc:creator>Ian Scarlett</dc:creator></item><item><title>RE: How to first date of the previous Quater of the given date.</title><link>http://www.sqlservercentral.com/Forums/Topic1404621-391-1.aspx</link><description>I would say this is where a calendar table like this one will come into best fit. [url]http://www.sqlservercentral.com/scripts/Date/68389/[/url]Then you can query it to find todays quarter, then lookup the previous quarters first day.</description><pubDate>Wed, 09 Jan 2013 02:53:54 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>How to first date of the previous Quater of the given date.</title><link>http://www.sqlservercentral.com/Forums/Topic1404621-391-1.aspx</link><description>Hi,  I am using Sql server 2008,  My requirement is to find the first date of the previous Quater of the given date.Example,Givendate              Quater        Required Output2013-01-20              1              2012-10-012013-03-20              1              2012-10-012013-04-10              2              2013-01-012012-10-10              4              2012-07-01Please Help me,As  I need this  very urgently.Thanks in Advance!</description><pubDate>Wed, 09 Jan 2013 02:44:07 GMT</pubDate><dc:creator>avdhut.k</dc:creator></item></channel></rss>