<?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; UDF &#8211; Function to Display Current Week Date and Day &#8211; Weekly Calendar</title>
	<atom:link href="http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/</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: Pankaj Bachhav</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-383720</link>
		<dc:creator><![CDATA[Pankaj Bachhav]]></dc:creator>
		<pubDate>Fri, 30 Nov 2012 06:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-383720</guid>
		<description><![CDATA[PANKAJ BACHHAV :
Thanks Pinal Dave sir, Your UDF really helped me but there is one problem ON &#039;30 Nov 2012&#039; it is not working properly it hides first row or it not returns first row please replay as early as possible]]></description>
		<content:encoded><![CDATA[<p>PANKAJ BACHHAV :<br />
Thanks Pinal Dave sir, Your UDF really helped me but there is one problem ON &#8217;30 Nov 2012&#8242; it is not working properly it hides first row or it not returns first row please replay as early as possible</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshi</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-259818</link>
		<dc:creator><![CDATA[Joshi]]></dc:creator>
		<pubDate>Mon, 05 Mar 2012 19:40:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-259818</guid>
		<description><![CDATA[Thanks dude, this is awesome!!!]]></description>
		<content:encoded><![CDATA[<p>Thanks dude, this is awesome!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepti</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-60399</link>
		<dc:creator><![CDATA[Deepti]]></dc:creator>
		<pubDate>Fri, 29 Jan 2010 20:26:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-60399</guid>
		<description><![CDATA[Thank you so much , this is great !]]></description>
		<content:encoded><![CDATA[<p>Thank you so much , this is great !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anita</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-59464</link>
		<dc:creator><![CDATA[Anita]]></dc:creator>
		<pubDate>Fri, 08 Jan 2010 08:32:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-59464</guid>
		<description><![CDATA[superb 
solved lot of issues
:)
cheers]]></description>
		<content:encoded><![CDATA[<p>superb<br />
solved lot of issues<br />
:)<br />
cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bryan</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-53236</link>
		<dc:creator><![CDATA[bryan]]></dc:creator>
		<pubDate>Wed, 24 Jun 2009 16:01:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-53236</guid>
		<description><![CDATA[i am trying to use this function but running into the very issue a previous poster had..

Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near &#039;(&#039;.

please help..

this function is exactly what i need for this particular project.]]></description>
		<content:encoded><![CDATA[<p>i am trying to use this function but running into the very issue a previous poster had..</p>
<p>Server: Msg 170, Level 15, State 1, Line 2<br />
Line 2: Incorrect syntax near &#8216;(&#8216;.</p>
<p>please help..</p>
<p>this function is exactly what i need for this particular project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renuga</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-43704</link>
		<dc:creator><![CDATA[Renuga]]></dc:creator>
		<pubDate>Wed, 15 Oct 2008 05:03:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-43704</guid>
		<description><![CDATA[how to generate the current date in Html as a heading where the current date is passed from sql.....]]></description>
		<content:encoded><![CDATA[<p>how to generate the current date in Html as a heading where the current date is passed from sql&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SprocsNewbie</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-34962</link>
		<dc:creator><![CDATA[SprocsNewbie]]></dc:creator>
		<pubDate>Thu, 10 Apr 2008 11:13:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-34962</guid>
		<description><![CDATA[Anyone knows how to make a function that will display weekly dates for a month. I mean it displays the dates per week in a rows.]]></description>
		<content:encoded><![CDATA[<p>Anyone knows how to make a function that will display weekly dates for a month. I mean it displays the dates per week in a rows.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: IsaCroft</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-34903</link>
		<dc:creator><![CDATA[IsaCroft]]></dc:creator>
		<pubDate>Mon, 07 Apr 2008 14:02:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-34903</guid>
		<description><![CDATA[Hello!!!

What about months of six weeks, like past march of 2008?
I had to correct the code to diaplay days 30, 31. and OK!! ;)]]></description>
		<content:encoded><![CDATA[<p>Hello!!!</p>
<p>What about months of six weeks, like past march of 2008?<br />
I had to correct the code to diaplay days 30, 31. and OK!! ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avinash Joshi</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-34074</link>
		<dc:creator><![CDATA[Avinash Joshi]]></dc:creator>
		<pubDate>Sat, 01 Mar 2008 11:13:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-34074</guid>
		<description><![CDATA[Thanks

Very very thanks

Avinash Joshi]]></description>
		<content:encoded><![CDATA[<p>Thanks</p>
<p>Very very thanks</p>
<p>Avinash Joshi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - UDF to Return a Calendar for Any Date for Any Year Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-33862</link>
		<dc:creator><![CDATA[SQL SERVER - UDF to Return a Calendar for Any Date for Any Year Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Wed, 20 Feb 2008 16:10:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-33862</guid>
		<description><![CDATA[[...] another UDF using that UDF which enhances functionality of it. I had written previous article about SQL SERVER - UDF - Function to Display Current Week Date and Day - Weekly Calendar. Reader of this blog and great SQL expert Dan Golden has wrote another UDF which uses UDF written [...]]]></description>
		<content:encoded><![CDATA[<p>[...] another UDF using that UDF which enhances functionality of it. I had written previous article about SQL SERVER &#8211; UDF &#8211; Function to Display Current Week Date and Day &#8211; Weekly Calendar. Reader of this blog and great SQL expert Dan Golden has wrote another UDF which uses UDF written [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Golden</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-33859</link>
		<dc:creator><![CDATA[Dan Golden]]></dc:creator>
		<pubDate>Wed, 20 Feb 2008 15:11:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-33859</guid>
		<description><![CDATA[I took the function and wrote another one on top of it to make a calendar....

You can call it like this:

select isnull(CONVERT(nvarchar(20), Sunday, 101), &#039;&#039;) as &#039;Sunday&#039;,
isnull(CONVERT(nvarchar(20), Monday, 101), &#039;&#039;) as &#039;Monday&#039;,
isnull(CONVERT(nvarchar(20), Tuesday, 101), &#039;&#039;) as &#039;Tuesday&#039;,
isnull(CONVERT(nvarchar(20), Wednesday, 101), &#039;&#039;) as &#039;Wednesday&#039;,
isnull(CONVERT(nvarchar(20), Thursday, 101), &#039;&#039;) as &#039;Thursday&#039;,
isnull(CONVERT(nvarchar(20), Friday, 101), &#039;&#039;) as &#039;Friday&#039;,
isnull(CONVERT(nvarchar(20), Saturday, 101), &#039;&#039;) as &#039;Saturday&#039;
from dbo.GetSQLCalendar(@WhatDay)

---------------------------------------------------------------------------

CREATE FUNCTION dbo.GetSQLCalendar(@WhatDate SMALLDATETIME)
RETURNS @WeekDateDay TABLE
(
Sunday SMALLDATETIME,
Monday SMALLDATETIME,
Tuesday SMALLDATETIME,
Wednesday SMALLDATETIME,
Thursday SMALLDATETIME,
Friday SMALLDATETIME,
Saturday SMALLDATETIME
)
AS
BEGIN

/*
Purpose:	To return a calendar for whatever month you want, driven by the date you pick as a variable.
By:		Dan Golden 
On:		2/20/2008
*/

DECLARE @ThreeWeeksAgo SMALLDATETIME
SET @ThreeWeeksAgo = DATEADD(d,-21,@WhatDate)

DECLARE @TwoWeeksAgo SMALLDATETIME
SET @TwoWeeksAgo = DATEADD(d,-14,@WhatDate)

DECLARE @PreviousWeek SMALLDATETIME
SET @PreviousWeek = DATEADD(d,-7,@WhatDate)

DECLARE @ThisWeek SMALLDATETIME
SET @ThisWeek = (@WhatDate)

DECLARE @NextWeek SMALLDATETIME
SET @NextWeek = DATEADD(d,7,@WhatDate)

DECLARE @LastWeek SMALLDATETIME
SET @LastWeek = DATEADD(d,14,@WhatDate)

DECLARE @AfterLastWeek SMALLDATETIME
SET @AfterLastWeek = DATEADD(d,21,@WhatDate)

INSERT INTO @WeekDateDay (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday)


select *
from
	(
	SELECT  case month(calendar.Sunday)
		when month(@WhatDate)
		then calendar.Sunday
		else null end as &#039;Sunday&#039;,
	
		case month(calendar.Monday)
		when month(@WhatDate)
		then calendar.Monday
		else null end as &#039;Monday&#039;,
	
		case month(calendar.Tuesday)
		when month(@WhatDate)
		then calendar.Tuesday
		else null end as &#039;Tuesday&#039;,
	
		case month(calendar.Wednesday)
		when month(@WhatDate)
		then calendar.Wednesday
		else null end as &#039;Wednesday&#039;,
	
		case month(calendar.Thursday)
		when month(@WhatDate)
		then calendar.Thursday
		else null end as &#039;Thursday&#039;,
	
		case month(calendar.Friday)
		when month(@WhatDate)
		then calendar.Friday
		else null end as &#039;Friday&#039;,
	
		case month(calendar.Saturday)
		when month(@WhatDate)
		then calendar.Saturday
		else null end as &#039;Saturday&#039;
	from 
		(
		SELECT *
		FROM dbo.DisplayCurrentWeekDays(@ThreeWeeksAgo)
		union all
		SELECT *
		FROM dbo.DisplayCurrentWeekDays(@TwoWeeksAgo)
		union all
		SELECT *
		FROM dbo.DisplayCurrentWeekDays(@PreviousWeek)
		union all
		SELECT *
		FROM dbo.DisplayCurrentWeekDays(@ThisWeek)
		union all
		SELECT *
		FROM dbo.DisplayCurrentWeekDays(@NextWeek)
		union all
		SELECT *
		FROM dbo.DisplayCurrentWeekDays(@LastWeek)
		union all
		SELECT *
		FROM dbo.DisplayCurrentWeekDays(@AfterLastWeek)
		) calendar
	) dates

where dates.sunday is not null
or dates.monday is not null
or dates.tuesday is not null
or dates.wednesday is not null
or dates.thursday is not null
or dates.friday is not null
or dates.saturday is not null

RETURN
END]]></description>
		<content:encoded><![CDATA[<p>I took the function and wrote another one on top of it to make a calendar&#8230;.</p>
<p>You can call it like this:</p>
<p>select isnull(CONVERT(nvarchar(20), Sunday, 101), &#8221;) as &#8216;Sunday&#8217;,<br />
isnull(CONVERT(nvarchar(20), Monday, 101), &#8221;) as &#8216;Monday&#8217;,<br />
isnull(CONVERT(nvarchar(20), Tuesday, 101), &#8221;) as &#8216;Tuesday&#8217;,<br />
isnull(CONVERT(nvarchar(20), Wednesday, 101), &#8221;) as &#8216;Wednesday&#8217;,<br />
isnull(CONVERT(nvarchar(20), Thursday, 101), &#8221;) as &#8216;Thursday&#8217;,<br />
isnull(CONVERT(nvarchar(20), Friday, 101), &#8221;) as &#8216;Friday&#8217;,<br />
isnull(CONVERT(nvarchar(20), Saturday, 101), &#8221;) as &#8216;Saturday&#8217;<br />
from dbo.GetSQLCalendar(@WhatDay)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>CREATE FUNCTION dbo.GetSQLCalendar(@WhatDate SMALLDATETIME)<br />
RETURNS @WeekDateDay TABLE<br />
(<br />
Sunday SMALLDATETIME,<br />
Monday SMALLDATETIME,<br />
Tuesday SMALLDATETIME,<br />
Wednesday SMALLDATETIME,<br />
Thursday SMALLDATETIME,<br />
Friday SMALLDATETIME,<br />
Saturday SMALLDATETIME<br />
)<br />
AS<br />
BEGIN</p>
<p>/*<br />
Purpose:	To return a calendar for whatever month you want, driven by the date you pick as a variable.<br />
By:		Dan Golden<br />
On:		2/20/2008<br />
*/</p>
<p>DECLARE @ThreeWeeksAgo SMALLDATETIME<br />
SET @ThreeWeeksAgo = DATEADD(d,-21,@WhatDate)</p>
<p>DECLARE @TwoWeeksAgo SMALLDATETIME<br />
SET @TwoWeeksAgo = DATEADD(d,-14,@WhatDate)</p>
<p>DECLARE @PreviousWeek SMALLDATETIME<br />
SET @PreviousWeek = DATEADD(d,-7,@WhatDate)</p>
<p>DECLARE @ThisWeek SMALLDATETIME<br />
SET @ThisWeek = (@WhatDate)</p>
<p>DECLARE @NextWeek SMALLDATETIME<br />
SET @NextWeek = DATEADD(d,7,@WhatDate)</p>
<p>DECLARE @LastWeek SMALLDATETIME<br />
SET @LastWeek = DATEADD(d,14,@WhatDate)</p>
<p>DECLARE @AfterLastWeek SMALLDATETIME<br />
SET @AfterLastWeek = DATEADD(d,21,@WhatDate)</p>
<p>INSERT INTO @WeekDateDay (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday)</p>
<p>select *<br />
from<br />
	(<br />
	SELECT  case month(calendar.Sunday)<br />
		when month(@WhatDate)<br />
		then calendar.Sunday<br />
		else null end as &#8216;Sunday&#8217;,</p>
<p>		case month(calendar.Monday)<br />
		when month(@WhatDate)<br />
		then calendar.Monday<br />
		else null end as &#8216;Monday&#8217;,</p>
<p>		case month(calendar.Tuesday)<br />
		when month(@WhatDate)<br />
		then calendar.Tuesday<br />
		else null end as &#8216;Tuesday&#8217;,</p>
<p>		case month(calendar.Wednesday)<br />
		when month(@WhatDate)<br />
		then calendar.Wednesday<br />
		else null end as &#8216;Wednesday&#8217;,</p>
<p>		case month(calendar.Thursday)<br />
		when month(@WhatDate)<br />
		then calendar.Thursday<br />
		else null end as &#8216;Thursday&#8217;,</p>
<p>		case month(calendar.Friday)<br />
		when month(@WhatDate)<br />
		then calendar.Friday<br />
		else null end as &#8216;Friday&#8217;,</p>
<p>		case month(calendar.Saturday)<br />
		when month(@WhatDate)<br />
		then calendar.Saturday<br />
		else null end as &#8216;Saturday&#8217;<br />
	from<br />
		(<br />
		SELECT *<br />
		FROM dbo.DisplayCurrentWeekDays(@ThreeWeeksAgo)<br />
		union all<br />
		SELECT *<br />
		FROM dbo.DisplayCurrentWeekDays(@TwoWeeksAgo)<br />
		union all<br />
		SELECT *<br />
		FROM dbo.DisplayCurrentWeekDays(@PreviousWeek)<br />
		union all<br />
		SELECT *<br />
		FROM dbo.DisplayCurrentWeekDays(@ThisWeek)<br />
		union all<br />
		SELECT *<br />
		FROM dbo.DisplayCurrentWeekDays(@NextWeek)<br />
		union all<br />
		SELECT *<br />
		FROM dbo.DisplayCurrentWeekDays(@LastWeek)<br />
		union all<br />
		SELECT *<br />
		FROM dbo.DisplayCurrentWeekDays(@AfterLastWeek)<br />
		) calendar<br />
	) dates</p>
<p>where dates.sunday is not null<br />
or dates.monday is not null<br />
or dates.tuesday is not null<br />
or dates.wednesday is not null<br />
or dates.thursday is not null<br />
or dates.friday is not null<br />
or dates.saturday is not null</p>
<p>RETURN<br />
END</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nitin Deshmukh</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-30483</link>
		<dc:creator><![CDATA[Nitin Deshmukh]]></dc:creator>
		<pubDate>Mon, 31 Dec 2007 06:21:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-30483</guid>
		<description><![CDATA[The function Really good.
Thanks for the script.]]></description>
		<content:encoded><![CDATA[<p>The function Really good.<br />
Thanks for the script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Hopper</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-24158</link>
		<dc:creator><![CDATA[Tom Hopper]]></dc:creator>
		<pubDate>Mon, 03 Dec 2007 18:11:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-24158</guid>
		<description><![CDATA[Is there an easy way to take today&#039;s date and find out what week it falls into?

Example:  7/11/2007 falls into:  Week #28

Would appreciate any help on this!]]></description>
		<content:encoded><![CDATA[<p>Is there an easy way to take today&#8217;s date and find out what week it falls into?</p>
<p>Example:  7/11/2007 falls into:  Week #28</p>
<p>Would appreciate any help on this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jayapriya</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-23436</link>
		<dc:creator><![CDATA[Jayapriya]]></dc:creator>
		<pubDate>Thu, 29 Nov 2007 04:37:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-23436</guid>
		<description><![CDATA[The function works good.
Thanks for the script.]]></description>
		<content:encoded><![CDATA[<p>The function works good.<br />
Thanks for the script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshul Kumar</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-17621</link>
		<dc:creator><![CDATA[Anshul Kumar]]></dc:creator>
		<pubDate>Mon, 05 Nov 2007 23:41:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-17621</guid>
		<description><![CDATA[Thanks Pinal 

It worked great.]]></description>
		<content:encoded><![CDATA[<p>Thanks Pinal </p>
<p>It worked great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Siva</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-16153</link>
		<dc:creator><![CDATA[Siva]]></dc:creator>
		<pubDate>Tue, 23 Oct 2007 00:05:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-16153</guid>
		<description><![CDATA[Thanks for the code.

If some one needs just today&#039;s day:


SELECT 
	CASE DATEPART(dw,getdate()) 
	WHEN 2 THEN &#039;MON&#039;
	WHEN 3 THEN &#039;TUE&#039;
	WHEN 4 THEN &#039;WED&#039;
	WHEN 5 THEN &#039;THU&#039;
	WHEN 6 THEN &#039;FRI&#039;
	WHEN 7 THEN &#039;SAT&#039;
	WHEN 1 THEN &#039;SUN&#039;
	ELSE &#039;ALL&#039;
	END]]></description>
		<content:encoded><![CDATA[<p>Thanks for the code.</p>
<p>If some one needs just today&#8217;s day:</p>
<p>SELECT<br />
	CASE DATEPART(dw,getdate())<br />
	WHEN 2 THEN &#8216;MON&#8217;<br />
	WHEN 3 THEN &#8216;TUE&#8217;<br />
	WHEN 4 THEN &#8216;WED&#8217;<br />
	WHEN 5 THEN &#8216;THU&#8217;<br />
	WHEN 6 THEN &#8216;FRI&#8217;<br />
	WHEN 7 THEN &#8216;SAT&#8217;<br />
	WHEN 1 THEN &#8216;SUN&#8217;<br />
	ELSE &#8216;ALL&#8217;<br />
	END</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jose</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-15210</link>
		<dc:creator><![CDATA[Jose]]></dc:creator>
		<pubDate>Fri, 12 Oct 2007 18:58:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-15210</guid>
		<description><![CDATA[I create the UDF successfully. I then run this:

--Following will return previous week date and days
SELECT *
FROM dbo.udf_DisplayCurrentWeekDateDays(DATEADD(d,-7,GETDATE()))

And get this error:

Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near &#039;(&#039;.]]></description>
		<content:encoded><![CDATA[<p>I create the UDF successfully. I then run this:</p>
<p>&#8211;Following will return previous week date and days<br />
SELECT *<br />
FROM dbo.udf_DisplayCurrentWeekDateDays(DATEADD(d,-7,GETDATE()))</p>
<p>And get this error:</p>
<p>Server: Msg 170, Level 15, State 1, Line 3<br />
Line 3: Incorrect syntax near &#8216;(&#8216;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Niaz</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-15134</link>
		<dc:creator><![CDATA[Niaz]]></dc:creator>
		<pubDate>Thu, 11 Oct 2007 00:41:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-15134</guid>
		<description><![CDATA[This function works great. Thanks,
Have a question. Would you advise in case I have question?  If yes, where can I submit my questions...
Thanks again,]]></description>
		<content:encoded><![CDATA[<p>This function works great. Thanks,<br />
Have a question. Would you advise in case I have question?  If yes, where can I submit my questions&#8230;<br />
Thanks again,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sumit</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-4082</link>
		<dc:creator><![CDATA[Sumit]]></dc:creator>
		<pubDate>Wed, 27 Jun 2007 08:02:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-4082</guid>
		<description><![CDATA[The code is very useful  and also very easy to understand.]]></description>
		<content:encoded><![CDATA[<p>The code is very useful  and also very easy to understand.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: really nice  code using it I created a function in my database</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-3866</link>
		<dc:creator><![CDATA[really nice  code using it I created a function in my database]]></dc:creator>
		<pubDate>Thu, 21 Jun 2007 12:51:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-3866</guid>
		<description><![CDATA[I found this code when I was searching for getting day of the week from today&#039;s date
I have to find out total transactions in the table in the last week .
How  to get it? please will u guide?
bye..
have a nice time..]]></description>
		<content:encoded><![CDATA[<p>I found this code when I was searching for getting day of the week from today&#8217;s date<br />
I have to find out total transactions in the table in the last week .<br />
How  to get it? please will u guide?<br />
bye..<br />
have a nice time..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wilson Gunanithi . J</title>
		<link>http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-3732</link>
		<dc:creator><![CDATA[Wilson Gunanithi . J]]></dc:creator>
		<pubDate>Sun, 17 Jun 2007 05:55:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/06/08/sql-server-udf-function-to-display-current-week-date-and-day-weekly-calendar/#comment-3732</guid>
		<description><![CDATA[I tested this .. Resultset is really very interesting...thank u..
bye

Regards

Wilson Gunanithi . J]]></description>
		<content:encoded><![CDATA[<p>I tested this .. Resultset is really very interesting&#8230;thank u..<br />
bye</p>
<p>Regards</p>
<p>Wilson Gunanithi . J</p>
]]></content:encoded>
	</item>
</channel>
</rss>
