<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Find Last Day of Any Month &#8211; Current Previous Next</title>
	<atom:link href="http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 17 May 2013 15:26:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Subir Sankar Das</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-466671</link>
		<dc:creator><![CDATA[Subir Sankar Das]]></dc:creator>
		<pubDate>Tue, 30 Apr 2013 11:23:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-466671</guid>
		<description><![CDATA[Last Year last month (if today is 30-Apr-2013, it should reflect 30-Apr-2012)]]></description>
		<content:encoded><![CDATA[<p>Last Year last month (if today is 30-Apr-2013, it should reflect 30-Apr-2012)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rahul Dewada</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-458479</link>
		<dc:creator><![CDATA[Rahul Dewada]]></dc:creator>
		<pubDate>Thu, 18 Apr 2013 07:22:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-458479</guid>
		<description><![CDATA[Hi Dear,

Very Important article of SQL Developers
Thank you.]]></description>
		<content:encoded><![CDATA[<p>Hi Dear,</p>
<p>Very Important article of SQL Developers<br />
Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-422121</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 15 Feb 2013 13:07:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-422121</guid>
		<description><![CDATA[You can find lot of such methods at the bottom section of http://beyondrelational.com/modules/2/blogs/70/posts/10899/understanding-datetime-column-part-iii.aspx]]></description>
		<content:encoded><![CDATA[<p>You can find lot of such methods at the bottom section of <a href="http://beyondrelational.com/modules/2/blogs/70/posts/10899/understanding-datetime-column-part-iii.aspx" rel="nofollow">http://beyondrelational.com/modules/2/blogs/70/posts/10899/understanding-datetime-column-part-iii.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luis Vela</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-421444</link>
		<dc:creator><![CDATA[Luis Vela]]></dc:creator>
		<pubDate>Wed, 13 Feb 2013 17:07:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-421444</guid>
		<description><![CDATA[Just Create this Stored Procedure in a Data Base 
And call it
============================
USE [TestDataBase]
GO
/****** Object: UserDefinedFunction [dbo].[LAST_DAY] Script Date: 11/08/2012 00:48:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
– =============================================
– Author: Luis R. Vela Morales
– Create date: 01/11/2012
– Description: De una fecha dada, retorna la
– fecha con el ultimo dia del mes,
– esto decrementando, sin afectar o
– incrementando en ‘n’ meses
– ( -n, 0, n).
– =============================================
CREATE FUNCTION [dbo].[LAST_DAY]
(
– Add the parameters for the function here
@Fecha datetime,
@Intervalo int
)
RETURNS datetime
AS
BEGIN
– Declare the return variable here
DECLARE @Result datetime

– Add the T-SQL statements to compute the return value here
SELECT @Result = DATEADD(day,-day(DATEADD(mm, 1+@Intervalo,@Fecha)),DATEADD(mm, 1+@Intervalo,@Fecha))

– Return the result of the function
RETURN @Result
END]]></description>
		<content:encoded><![CDATA[<p>Just Create this Stored Procedure in a Data Base<br />
And call it<br />
============================<br />
USE [TestDataBase]<br />
GO<br />
/****** Object: UserDefinedFunction [dbo].[LAST_DAY] Script Date: 11/08/2012 00:48:07 ******/<br />
SET ANSI_NULLS ON<br />
GO<br />
SET QUOTED_IDENTIFIER ON<br />
GO<br />
– =============================================<br />
– Author: Luis R. Vela Morales<br />
– Create date: 01/11/2012<br />
– Description: De una fecha dada, retorna la<br />
– fecha con el ultimo dia del mes,<br />
– esto decrementando, sin afectar o<br />
– incrementando en ‘n’ meses<br />
– ( -n, 0, n).<br />
– =============================================<br />
CREATE FUNCTION [dbo].[LAST_DAY]<br />
(<br />
– Add the parameters for the function here<br />
@Fecha datetime,<br />
@Intervalo int<br />
)<br />
RETURNS datetime<br />
AS<br />
BEGIN<br />
– Declare the return variable here<br />
DECLARE @Result datetime</p>
<p>– Add the T-SQL statements to compute the return value here<br />
SELECT @Result = DATEADD(day,-day(DATEADD(mm, 1+@Intervalo,@Fecha)),DATEADD(mm, 1+@Intervalo,@Fecha))</p>
<p>– Return the result of the function<br />
RETURN @Result<br />
END</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-421376</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 13 Feb 2013 13:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-421376</guid>
		<description><![CDATA[declare @date datetime
set @date=&#039;20120101&#039;
select dateadd(month,datediff(month,0,dates)+1,-1) as last_day from
(
select dateadd(month,number,@date) as dates from master..spt_values
where type=&#039;p&#039; and number between 0 and 6
) as t]]></description>
		<content:encoded><![CDATA[<p>declare @date datetime<br />
set @date=&#8217;20120101&#8242;<br />
select dateadd(month,datediff(month,0,dates)+1,-1) as last_day from<br />
(<br />
select dateadd(month,number,@date) as dates from master..spt_values<br />
where type=&#8217;p&#8217; and number between 0 and 6<br />
) as t</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satya</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-415200</link>
		<dc:creator><![CDATA[Satya]]></dc:creator>
		<pubDate>Wed, 30 Jan 2013 10:47:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-415200</guid>
		<description><![CDATA[I want exact month end date so 

declare @date datetime
set @date=&#039;31-jan-2012&#039;
while @date&lt;=&#039;31-jul-2012&#039;
Begin
print @date
set @date= DATEADD(M,1,@date)
End
 but i&#039;m getting result like
Jan 31 2012 12:00AM
Feb 29 2012 12:00AM
Mar 29 2012 12:00AM
Apr 29 2012 12:00AM
May 29 2012 12:00AM
Jun 29 2012 12:00AM
Jul 29 2012 12:00AM
Please help me to get exact month end date]]></description>
		<content:encoded><![CDATA[<p>I want exact month end date so </p>
<p>declare @date datetime<br />
set @date=&#8217;31-jan-2012&#8242;<br />
while @date&lt;=&#039;31-jul-2012&#039;<br />
Begin<br />
print @date<br />
set @date= DATEADD(M,1,@date)<br />
End<br />
 but i&#039;m getting result like<br />
Jan 31 2012 12:00AM<br />
Feb 29 2012 12:00AM<br />
Mar 29 2012 12:00AM<br />
Apr 29 2012 12:00AM<br />
May 29 2012 12:00AM<br />
Jun 29 2012 12:00AM<br />
Jul 29 2012 12:00AM<br />
Please help me to get exact month end date</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pablo Maria</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-412573</link>
		<dc:creator><![CDATA[Pablo Maria]]></dc:creator>
		<pubDate>Thu, 24 Jan 2013 23:44:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-412573</guid>
		<description><![CDATA[Thank you very much for your post !]]></description>
		<content:encoded><![CDATA[<p>Thank you very much for your post !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devashish Das</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-411193</link>
		<dc:creator><![CDATA[Devashish Das]]></dc:creator>
		<pubDate>Tue, 22 Jan 2013 11:29:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-411193</guid>
		<description><![CDATA[--Alter Nate Method
DECLARE @MyDate DATETIME
SET @MyDate = &#039;26-Jul-2013&#039;

-- Previous Month
SELECT DATEADD(d, -1*day(@MyDate), @MyDate)
-- Given Month
SELECT DATEADD(d, -1*day(@MyDate), DATEADD(mm,1,@MyDate))
-- Next Month
SELECT DATEADD(d, -1*day(@MyDate), DATEADD(mm,2,@MyDate))]]></description>
		<content:encoded><![CDATA[<p>&#8211;Alter Nate Method<br />
DECLARE @MyDate DATETIME<br />
SET @MyDate = &#8217;26-Jul-2013&#8242;</p>
<p>&#8211; Previous Month<br />
SELECT DATEADD(d, -1*day(@MyDate), @MyDate)<br />
&#8211; Given Month<br />
SELECT DATEADD(d, -1*day(@MyDate), DATEADD(mm,1,@MyDate))<br />
&#8211; Next Month<br />
SELECT DATEADD(d, -1*day(@MyDate), DATEADD(mm,2,@MyDate))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devashish Das</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-411187</link>
		<dc:creator><![CDATA[Devashish Das]]></dc:creator>
		<pubDate>Tue, 22 Jan 2013 11:23:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-411187</guid>
		<description><![CDATA[--Alternate method

DECLARE @MyDate DATETIME
SET @MyDate = &#039;26-Jul-2013&#039;

SELECT DATEADD(d, -1*day(@MyDate), DATEADD(mm,-1,@MyDate))
SELECT DATEADD(d, -1*day(@MyDate), @MyDate)
SELECT DATEADD(d, -1*day(@MyDate), DATEADD(mm,1,@MyDate))]]></description>
		<content:encoded><![CDATA[<p>&#8211;Alternate method</p>
<p>DECLARE @MyDate DATETIME<br />
SET @MyDate = &#8217;26-Jul-2013&#8242;</p>
<p>SELECT DATEADD(d, -1*day(@MyDate), DATEADD(mm,-1,@MyDate))<br />
SELECT DATEADD(d, -1*day(@MyDate), @MyDate)<br />
SELECT DATEADD(d, -1*day(@MyDate), DATEADD(mm,1,@MyDate))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: harsh</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-410688</link>
		<dc:creator><![CDATA[harsh]]></dc:creator>
		<pubDate>Mon, 21 Jan 2013 12:09:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-410688</guid>
		<description><![CDATA[select GETDATE()- DAY(GETDATE())
or
select EOMONTH(GETDATE(),-1) /* in SQL 2012*/
will give same result]]></description>
		<content:encoded><![CDATA[<p>select GETDATE()- DAY(GETDATE())<br />
or<br />
select EOMONTH(GETDATE(),-1) /* in SQL 2012*/<br />
will give same result</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manoj Sahoo</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-410661</link>
		<dc:creator><![CDATA[Manoj Sahoo]]></dc:creator>
		<pubDate>Mon, 21 Jan 2013 10:45:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-410661</guid>
		<description><![CDATA[for Last Date of previous month  

select DATEADD(D,-( DATEPART(D,GETDATE())),GETDATE())]]></description>
		<content:encoded><![CDATA[<p>for Last Date of previous month  </p>
<p>select DATEADD(D,-( DATEPART(D,GETDATE())),GETDATE())</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dipanjan</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-401757</link>
		<dc:creator><![CDATA[Dipanjan]]></dc:creator>
		<pubDate>Mon, 31 Dec 2012 07:58:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-401757</guid>
		<description><![CDATA[I need a solution ...
Here are the details....
Step a) I will select a month and year(eg. January 2012) from UI.
Step b) It should return four months back data (only month number).
for this purpose i am trying to use datediff(m,,) function, this is perfectly working for current year( from May to December month).

but when i am selecting January month it is returning current years September month but i need to get last year&#039;s September month. Same as for February, March, April month.

Please help.]]></description>
		<content:encoded><![CDATA[<p>I need a solution &#8230;<br />
Here are the details&#8230;.<br />
Step a) I will select a month and year(eg. January 2012) from UI.<br />
Step b) It should return four months back data (only month number).<br />
for this purpose i am trying to use datediff(m,,) function, this is perfectly working for current year( from May to December month).</p>
<p>but when i am selecting January month it is returning current years September month but i need to get last year&#8217;s September month. Same as for February, March, April month.</p>
<p>Please help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gopal Singh</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-372047</link>
		<dc:creator><![CDATA[Gopal Singh]]></dc:creator>
		<pubDate>Sat, 10 Nov 2012 06:33:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-372047</guid>
		<description><![CDATA[Thnks sir providing code for getting last date of previous month in sql server.]]></description>
		<content:encoded><![CDATA[<p>Thnks sir providing code for getting last date of previous month in sql server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luis Vela</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-371110</link>
		<dc:creator><![CDATA[Luis Vela]]></dc:creator>
		<pubDate>Thu, 08 Nov 2012 06:52:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-371110</guid>
		<description><![CDATA[USE [TestDataBase]
GO
/****** Object:  UserDefinedFunction [dbo].[LAST_DAY]    Script Date: 11/08/2012 00:48:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Luis R. Vela Morales
-- Create date: 01/11/2012
-- Description:	De una fecha dada, retorna la
--				fecha con el ultimo dia del mes,
--				esto decrementando, sin afectar o
--				incrementando en &#039;n&#039; meses
--				( -n, 0, n).
-- =============================================
CREATE FUNCTION [dbo].[LAST_DAY] 
(
	-- Add the parameters for the function here
	@Fecha datetime,
	@Intervalo int
)
RETURNS datetime
AS
BEGIN
	-- Declare the return variable here
	DECLARE @Result datetime

	-- Add the T-SQL statements to compute the return value here
	SELECT @Result = DATEADD(day,-day(DATEADD(mm, 1+@Intervalo,@Fecha)),DATEADD(mm, 1+@Intervalo,@Fecha))

	-- Return the result of the function
	RETURN @Result
END]]></description>
		<content:encoded><![CDATA[<p>USE [TestDataBase]<br />
GO<br />
/****** Object:  UserDefinedFunction [dbo].[LAST_DAY]    Script Date: 11/08/2012 00:48:07 ******/<br />
SET ANSI_NULLS ON<br />
GO<br />
SET QUOTED_IDENTIFIER ON<br />
GO<br />
&#8211; =============================================<br />
&#8211; Author:		Luis R. Vela Morales<br />
&#8211; Create date: 01/11/2012<br />
&#8211; Description:	De una fecha dada, retorna la<br />
&#8211;				fecha con el ultimo dia del mes,<br />
&#8211;				esto decrementando, sin afectar o<br />
&#8211;				incrementando en &#8216;n&#8217; meses<br />
&#8211;				( -n, 0, n).<br />
&#8211; =============================================<br />
CREATE FUNCTION [dbo].[LAST_DAY]<br />
(<br />
	&#8211; Add the parameters for the function here<br />
	@Fecha datetime,<br />
	@Intervalo int<br />
)<br />
RETURNS datetime<br />
AS<br />
BEGIN<br />
	&#8211; Declare the return variable here<br />
	DECLARE @Result datetime</p>
<p>	&#8211; Add the T-SQL statements to compute the return value here<br />
	SELECT @Result = DATEADD(day,-day(DATEADD(mm, 1+@Intervalo,@Fecha)),DATEADD(mm, 1+@Intervalo,@Fecha))</p>
<p>	&#8211; Return the result of the function<br />
	RETURN @Result<br />
END</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luis Vela</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-370914</link>
		<dc:creator><![CDATA[Luis Vela]]></dc:creator>
		<pubDate>Wed, 07 Nov 2012 20:26:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-370914</guid>
		<description><![CDATA[DECLARE @MyDate datetime
SET @MyDate=&#039;15/03/1977&#039;
DECLARE @Interval int
SET @Interval=0

SELECT DATEADD(day,-day(@MyDate),DATEADD(mm, 1+@Interval,@MyDate))]]></description>
		<content:encoded><![CDATA[<p>DECLARE @MyDate datetime<br />
SET @MyDate=&#8217;15/03/1977&#8242;<br />
DECLARE @Interval int<br />
SET @Interval=0</p>
<p>SELECT DATEADD(day,-day(@MyDate),DATEADD(mm, 1+@Interval,@MyDate))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tsonev8</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-370796</link>
		<dc:creator><![CDATA[tsonev8]]></dc:creator>
		<pubDate>Wed, 07 Nov 2012 13:43:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-370796</guid>
		<description><![CDATA[Hi. Thanks for the post. 

This returns 2012-10-31 23:59:59.000

How to make it to return 2012-10-31 00:00:00 000 ?]]></description>
		<content:encoded><![CDATA[<p>Hi. Thanks for the post. </p>
<p>This returns 2012-10-31 23:59:59.000</p>
<p>How to make it to return 2012-10-31 00:00:00 000 ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhishek Dwivedi</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-351731</link>
		<dc:creator><![CDATA[Abhishek Dwivedi]]></dc:creator>
		<pubDate>Fri, 21 Sep 2012 09:07:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-351731</guid>
		<description><![CDATA[Awesome! Thanks a lot, this is what I was looking for.

-Abhi]]></description>
		<content:encoded><![CDATA[<p>Awesome! Thanks a lot, this is what I was looking for.</p>
<p>-Abhi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Velmurugan</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-345548</link>
		<dc:creator><![CDATA[Velmurugan]]></dc:creator>
		<pubDate>Fri, 14 Sep 2012 07:42:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-345548</guid>
		<description><![CDATA[Hi,

I am trying yo replicate the &#039;n&#039;th week and nth day of that week from the defined calender table. can anyone help me in writing query for the same, thanks..

Velmurugan]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am trying yo replicate the &#8216;n&#8217;th week and nth day of that week from the defined calender table. can anyone help me in writing query for the same, thanks..</p>
<p>Velmurugan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-341431</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Thu, 06 Sep 2012 09:45:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-341431</guid>
		<description><![CDATA[Look at the examples posted at the bottom of this post and you will have an idea
http://beyondrelational.com/modules/2/blogs/70/posts/10899/understanding-datetime-column-part-iii.aspx]]></description>
		<content:encoded><![CDATA[<p>Look at the examples posted at the bottom of this post and you will have an idea<br />
<a href="http://beyondrelational.com/modules/2/blogs/70/posts/10899/understanding-datetime-column-part-iii.aspx" rel="nofollow">http://beyondrelational.com/modules/2/blogs/70/posts/10899/understanding-datetime-column-part-iii.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shine</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-341115</link>
		<dc:creator><![CDATA[Shine]]></dc:creator>
		<pubDate>Wed, 05 Sep 2012 13:27:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-341115</guid>
		<description><![CDATA[i need to get the tranaction details happend between current date and same date of prevoius month.how can i .pls help]]></description>
		<content:encoded><![CDATA[<p>i need to get the tranaction details happend between current date and same date of prevoius month.how can i .pls help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JimmyMcWizard</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-339709</link>
		<dc:creator><![CDATA[JimmyMcWizard]]></dc:creator>
		<pubDate>Fri, 31 Aug 2012 21:55:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-339709</guid>
		<description><![CDATA[There&#039;s a way shorter method in SQL Server 2012:

SELECT [MonthEnd] = EOMONTH()

Enjoy.]]></description>
		<content:encoded><![CDATA[<p>There&#8217;s a way shorter method in SQL Server 2012:</p>
<p>SELECT [MonthEnd] = EOMONTH()</p>
<p>Enjoy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-336838</link>
		<dc:creator><![CDATA[Mike]]></dc:creator>
		<pubDate>Fri, 24 Aug 2012 14:23:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-336838</guid>
		<description><![CDATA[I use this code to return the last friday in any month:

SELECT DATEADD(day, (DATEDIFF (day, &#039;2010-01-01&#039;, (SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)))) / 7) * 7, &#039;2010-01-01&#039;) AS &quot;LAST_FRIDAY_OF_MONTH&quot;]]></description>
		<content:encoded><![CDATA[<p>I use this code to return the last friday in any month:</p>
<p>SELECT DATEADD(day, (DATEDIFF (day, &#8217;2010-01-01&#8242;, (SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())+1,0)))) / 7) * 7, &#8217;2010-01-01&#8242;) AS &#8220;LAST_FRIDAY_OF_MONTH&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-319224</link>
		<dc:creator><![CDATA[Amit]]></dc:creator>
		<pubDate>Thu, 26 Jul 2012 09:10:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-319224</guid>
		<description><![CDATA[How do I find the last 12 months from a given date including the current month. For example: 
If the given date is 15-Jan-2012
It should return; jan 2012, dec 2011, nov 2011, oct 2011, sept 2011, aug 2011, july 2011, june 2011, may 2011, apr 2011, mar 2011, feb 2011

or if the given date is 31-Dec-2011
It should return; dec 2011, nov 2011, oct 2011, sept 2011, aug 2011, july 2011, june 2011, may 2011, apr 2011, mar 2011, feb 2011, jan 2011]]></description>
		<content:encoded><![CDATA[<p>How do I find the last 12 months from a given date including the current month. For example:<br />
If the given date is 15-Jan-2012<br />
It should return; jan 2012, dec 2011, nov 2011, oct 2011, sept 2011, aug 2011, july 2011, june 2011, may 2011, apr 2011, mar 2011, feb 2011</p>
<p>or if the given date is 31-Dec-2011<br />
It should return; dec 2011, nov 2011, oct 2011, sept 2011, aug 2011, july 2011, june 2011, may 2011, apr 2011, mar 2011, feb 2011, jan 2011</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-313718</link>
		<dc:creator><![CDATA[Fred]]></dc:creator>
		<pubDate>Sun, 15 Jul 2012 15:47:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-313718</guid>
		<description><![CDATA[Thanks a lot mate.]]></description>
		<content:encoded><![CDATA[<p>Thanks a lot mate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill G</title>
		<link>http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-308944</link>
		<dc:creator><![CDATA[Bill G]]></dc:creator>
		<pubDate>Tue, 03 Jul 2012 20:27:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/18/sql-server-find-last-day-of-any-month-current-previous-next/#comment-308944</guid>
		<description><![CDATA[thanks dude; i was trying to write a sql script.]]></description>
		<content:encoded><![CDATA[<p>thanks dude; i was trying to write a sql script.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
