<?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; Detecting Leap Year in T-SQL using SQL Server 2012 &#8211; IIF, EOMONTH and CONCAT Function</title>
	<atom:link href="http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Wed, 19 Jun 2013 21:45:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #018 &#124; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-430072</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #018 &#124; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 02 Mar 2013 01:31:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-430072</guid>
		<description><![CDATA[[...] Detecting Leap Year in T-SQL using SQL Server 2012 – IIF, EOMONTH and CONCAT Function This blog post is dedicated to February 29, the date which shows up at every four years. I wrote a blog post where I explained how I to detect this rare date. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Detecting Leap Year in T-SQL using SQL Server 2012 – IIF, EOMONTH and CONCAT Function This blog post is dedicated to February 29, the date which shows up at every four years. I wrote a blog post where I explained how I to detect this rare date. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; A Puzzle &#8211; Swap Value of Column Without Case Statement &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-296997</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; A Puzzle &#8211; Swap Value of Column Without Case Statement &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Fri, 08 Jun 2012 01:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-296997</guid>
		<description><![CDATA[[...] SQL SERVER – Detecting Leap Year in T-SQL using SQL Server 2012 – IIF, EOMONTH and CONCAT Functi... [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER – Detecting Leap Year in T-SQL using SQL Server 2012 – IIF, EOMONTH and CONCAT Functi&#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-287551</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 23 May 2012 10:55:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-287551</guid>
		<description><![CDATA[Many more methods to find out a leap year
http://beyondrelational.com/modules/2/blogs/70/posts/10934/different-ways-to-find-out-a-leap-year.aspx]]></description>
		<content:encoded><![CDATA[<p>Many more methods to find out a leap year<br />
<a href="http://beyondrelational.com/modules/2/blogs/70/posts/10934/different-ways-to-find-out-a-leap-year.aspx" rel="nofollow">http://beyondrelational.com/modules/2/blogs/70/posts/10934/different-ways-to-find-out-a-leap-year.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohandas Pk</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-285083</link>
		<dc:creator><![CDATA[Mohandas Pk]]></dc:creator>
		<pubDate>Wed, 16 May 2012 09:48:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-285083</guid>
		<description><![CDATA[JUST USE ISDATE() FUNCTION like:-

CREATE FUNCTION dbo.IsLeapYear (@year INT)
RETURNS INT
AS
BEGIN
RETURN ISDATE(&#039;02/29/&#039;+ Cast(@year AS varchar(4)))
END

GO
SELECT dbo.IsLeapYear(2012)]]></description>
		<content:encoded><![CDATA[<p>JUST USE ISDATE() FUNCTION like:-</p>
<p>CREATE FUNCTION dbo.IsLeapYear (@year INT)<br />
RETURNS INT<br />
AS<br />
BEGIN<br />
RETURN ISDATE(&#8217;02/29/&#8217;+ Cast(@year AS varchar(4)))<br />
END</p>
<p>GO<br />
SELECT dbo.IsLeapYear(2012)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-265335</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 20 Mar 2012 13:14:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-265335</guid>
		<description><![CDATA[Note that this will not work versions prior to 2012]]></description>
		<content:encoded><![CDATA[<p>Note that this will not work versions prior to 2012</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Various Leap Year Logics &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-258697</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Various Leap Year Logics &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 03 Mar 2012 01:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-258697</guid>
		<description><![CDATA[[...] I wrote one article on Leap Year and created one video about Leap Year. My point of view was to demonstrate how we can use SQL [...]]]></description>
		<content:encoded><![CDATA[<p>[...] I wrote one article on Leap Year and created one video about Leap Year. My point of view was to demonstrate how we can use SQL [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-258221</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Thu, 01 Mar 2012 13:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-258221</guid>
		<description><![CDATA[Excellent David]]></description>
		<content:encoded><![CDATA[<p>Excellent David</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davidbridge</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-258190</link>
		<dc:creator><![CDATA[davidbridge]]></dc:creator>
		<pubDate>Thu, 01 Mar 2012 11:17:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-258190</guid>
		<description><![CDATA[fbncs: your function is incorrect for adjustment years. 

Admittedly the next adjustment year is 2100 so many of us will not actually care about this but fact remains that we cannot just check if the year is divisible by 4.

This is why MS saw fit to put the function in to SQL so that developers do not have to worry about it. I think we should avoid re-inventing the wheel and check a date against what Microsoft has done for us (even in 2008 the functionality exists as it knows if there are 29 days if you ask it that question directly) hence I think it works to take one off 1st march and test if its 29 in SQL Server 2008 and use the function Pinal spoke of for 2012.

Personally I would always recommend using a date (calendar) table in your database ratherthan a date calculation as you allow not oly for leap years but also all other special dates, company financial year etc.

Check out this excerpt from wikipedia page 

http://en.wikipedia.org/wiki/Leap_year


&quot;most years that are evenly divisible by 4 are leap years...&quot;

&quot;...Some exceptions to this rule are required since the duration of a solar year is slightly less than 365.25 days. Years that are evenly divisible by 100 are not leap years, unless they are also evenly divisible by 400, in which case they are leap years. For example, 1600 and 2000 were leap years, but 1700, 1800 and 1900 were not. Similarly, 2100, 2200, 2300, 2500, 2600, 2700, 2900 and 3000 will not be leap years, but 2400 and 2800 will be.&quot;]]></description>
		<content:encoded><![CDATA[<p>fbncs: your function is incorrect for adjustment years. </p>
<p>Admittedly the next adjustment year is 2100 so many of us will not actually care about this but fact remains that we cannot just check if the year is divisible by 4.</p>
<p>This is why MS saw fit to put the function in to SQL so that developers do not have to worry about it. I think we should avoid re-inventing the wheel and check a date against what Microsoft has done for us (even in 2008 the functionality exists as it knows if there are 29 days if you ask it that question directly) hence I think it works to take one off 1st march and test if its 29 in SQL Server 2008 and use the function Pinal spoke of for 2012.</p>
<p>Personally I would always recommend using a date (calendar) table in your database ratherthan a date calculation as you allow not oly for leap years but also all other special dates, company financial year etc.</p>
<p>Check out this excerpt from wikipedia page </p>
<p><a href="http://en.wikipedia.org/wiki/Leap_year" rel="nofollow">http://en.wikipedia.org/wiki/Leap_year</a></p>
<p>&#8220;most years that are evenly divisible by 4 are leap years&#8230;&#8221;</p>
<p>&#8220;&#8230;Some exceptions to this rule are required since the duration of a solar year is slightly less than 365.25 days. Years that are evenly divisible by 100 are not leap years, unless they are also evenly divisible by 400, in which case they are leap years. For example, 1600 and 2000 were leap years, but 1700, 1800 and 1900 were not. Similarly, 2100, 2200, 2300, 2500, 2600, 2700, 2900 and 3000 will not be leap years, but 2400 and 2800 will be.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fbncs</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-258073</link>
		<dc:creator><![CDATA[fbncs]]></dc:creator>
		<pubDate>Wed, 29 Feb 2012 23:08:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-258073</guid>
		<description><![CDATA[create function fncLeapYear 
 (@date smalldatetime) returns bit
as
begin
  declare @r bit
  set @r = case year(@date)%4 when 0 then 1 else 0 end

  return @r
end



select dbo.fncLeapYear (getdate())]]></description>
		<content:encoded><![CDATA[<p>create function fncLeapYear<br />
 (@date smalldatetime) returns bit<br />
as<br />
begin<br />
  declare @r bit<br />
  set @r = case year(@date)%4 when 0 then 1 else 0 end</p>
<p>  return @r<br />
end</p>
<p>select dbo.fncLeapYear (getdate())</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fbncs</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-258071</link>
		<dc:creator><![CDATA[fbncs]]></dc:creator>
		<pubDate>Wed, 29 Feb 2012 23:01:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-258071</guid>
		<description><![CDATA[Just divide year by 4. If the remainder of the division returns 0, its leap year.

select 2012 % 4

 returns 0


simple]]></description>
		<content:encoded><![CDATA[<p>Just divide year by 4. If the remainder of the division returns 0, its leap year.</p>
<p>select 2012 % 4</p>
<p> returns 0</p>
<p>simple</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sanjay Khot</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257927</link>
		<dc:creator><![CDATA[Sanjay Khot]]></dc:creator>
		<pubDate>Wed, 29 Feb 2012 12:46:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257927</guid>
		<description><![CDATA[Hi Ramesh

The formula you have written is wrong. You have to check the century year as well as year divisible by 400.

Thanks
Sanjay]]></description>
		<content:encoded><![CDATA[<p>Hi Ramesh</p>
<p>The formula you have written is wrong. You have to check the century year as well as year divisible by 400.</p>
<p>Thanks<br />
Sanjay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257894</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Wed, 29 Feb 2012 10:51:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257894</guid>
		<description><![CDATA[Thank you DAVE - we all are SQL Dave for sure!]]></description>
		<content:encoded><![CDATA[<p>Thank you DAVE &#8211; we all are SQL Dave for sure!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davidbridge</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257878</link>
		<dc:creator><![CDATA[davidbridge]]></dc:creator>
		<pubDate>Wed, 29 Feb 2012 10:04:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257878</guid>
		<description><![CDATA[Thanks for posting even more info on SQL Server 2012 features and please keep them coming as this is a great place to learn.

And well done to David for your excellent 2008 version. I really like what you did there. Whenever I see a bit of 2012 code I always wonder how to acheive the same thing in 2008 and its usually not too hard to work out but it is usually longer and slightly more difficult to follow. Yours isn&#039;t in-fact it proves that sometimes new features are just there for the more obvious issues and not always better (like CONCAT - which is pretty simple to mimick in 2008).

(incidentally - Another approach would be to take one day off March 1st and see if it is 29)


Thanks to both of you.

Dave (are we collectively all SQL Dave?)]]></description>
		<content:encoded><![CDATA[<p>Thanks for posting even more info on SQL Server 2012 features and please keep them coming as this is a great place to learn.</p>
<p>And well done to David for your excellent 2008 version. I really like what you did there. Whenever I see a bit of 2012 code I always wonder how to acheive the same thing in 2008 and its usually not too hard to work out but it is usually longer and slightly more difficult to follow. Yours isn&#8217;t in-fact it proves that sometimes new features are just there for the more obvious issues and not always better (like CONCAT &#8211; which is pretty simple to mimick in 2008).</p>
<p>(incidentally &#8211; Another approach would be to take one day off March 1st and see if it is 29)</p>
<p>Thanks to both of you.</p>
<p>Dave (are we collectively all SQL Dave?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257856</link>
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Wed, 29 Feb 2012 08:16:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257856</guid>
		<description><![CDATA[I know you wanted to showcase the SQL2012 functions, but another solution that doesn&#039;t depend on SQL2012 and is much shorter and easier to understand is to just use the IsDate() function as in this example: 

declare @Year int = 2012
select isdate(&#039;2/29/&#039; + cast(@Year as char(4)))

Note that besides being very simple to read and understand, this works correctly for null, 2 digit years and all of the whole centuries too. Unlike some of the solutions I&#039;ve seen, this one does not cause a divide-by-zero error when the year = 0. Most of this SQL is test cases. The real code is all on one short line.

;with TestData (Y) as (
      select cast(null as int)
union select 0
union select 1
union select 2
union select 3
union select 4
union select 5
union select 48
union select 52
union select 1900
union select 1996
union select 1999
union select 2000
union select 2001
union select 2004
union select 2011
union select 2012
union select 2013
union select 2100
union select 987654321
)
select	Y as [Year], 
		/*
		Careful - According to SQL BOL,
		ISDATE is deterministic only if you use it with the CONVERT function, 
			if the CONVERT style parameter is specified, and style is not equal to 0, 100, 9, or 109.
		The return value of ISDATE depends on the settings set by 
			SET DATEFORMAT, SET LANGUAGE and default language option. 
		The date string may need to be formatted differently depending on your SQL server configuration.
		This next column is the one that determines if the specified year is a leap year.
		*/
		isdate(&#039;2/29/&#039; + cast(Y as char(4))) as IsLeapYear,
		-- This next column is unnecessary. 
		-- It just shows that this works with 1 &amp; 2 digit years
		case when isdate(&#039;2/29/&#039; + cast(Y as varchar(4))) = 1 
			then cast(&#039;2/29/&#039; + cast(Y as varchar(4)) as date)
			else null 
			end as LeapDay
from TestData
order by Y]]></description>
		<content:encoded><![CDATA[<p>I know you wanted to showcase the SQL2012 functions, but another solution that doesn&#8217;t depend on SQL2012 and is much shorter and easier to understand is to just use the IsDate() function as in this example: </p>
<p>declare @Year int = 2012<br />
select isdate(&#8217;2/29/&#8217; + cast(@Year as char(4)))</p>
<p>Note that besides being very simple to read and understand, this works correctly for null, 2 digit years and all of the whole centuries too. Unlike some of the solutions I&#8217;ve seen, this one does not cause a divide-by-zero error when the year = 0. Most of this SQL is test cases. The real code is all on one short line.</p>
<p>;with TestData (Y) as (<br />
      select cast(null as int)<br />
union select 0<br />
union select 1<br />
union select 2<br />
union select 3<br />
union select 4<br />
union select 5<br />
union select 48<br />
union select 52<br />
union select 1900<br />
union select 1996<br />
union select 1999<br />
union select 2000<br />
union select 2001<br />
union select 2004<br />
union select 2011<br />
union select 2012<br />
union select 2013<br />
union select 2100<br />
union select 987654321<br />
)<br />
select	Y as [Year],<br />
		/*<br />
		Careful &#8211; According to SQL BOL,<br />
		ISDATE is deterministic only if you use it with the CONVERT function,<br />
			if the CONVERT style parameter is specified, and style is not equal to 0, 100, 9, or 109.<br />
		The return value of ISDATE depends on the settings set by<br />
			SET DATEFORMAT, SET LANGUAGE and default language option.<br />
		The date string may need to be formatted differently depending on your SQL server configuration.<br />
		This next column is the one that determines if the specified year is a leap year.<br />
		*/<br />
		isdate(&#8217;2/29/&#8217; + cast(Y as char(4))) as IsLeapYear,<br />
		&#8211; This next column is unnecessary.<br />
		&#8211; It just shows that this works with 1 &amp; 2 digit years<br />
		case when isdate(&#8217;2/29/&#8217; + cast(Y as varchar(4))) = 1<br />
			then cast(&#8217;2/29/&#8217; + cast(Y as varchar(4)) as date)<br />
			else null<br />
			end as LeapDay<br />
from TestData<br />
order by Y</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jayan</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257813</link>
		<dc:creator><![CDATA[Jayan]]></dc:creator>
		<pubDate>Wed, 29 Feb 2012 05:19:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257813</guid>
		<description><![CDATA[I used to write some thing similar to this in my javascript date validations. Since I dont have SQL2012 currently, I use &#039;if&#039;. Using iif would make the code shorter and I guess this uses less resources.

DECLARE @year int
SET @year = 2012
if (((@year % 4 = 0) AND (@year % 100 != 0)) OR (@year % 400 = 0))
	print &#039;1&#039;
ELSE
	print &#039;0&#039;]]></description>
		<content:encoded><![CDATA[<p>I used to write some thing similar to this in my javascript date validations. Since I dont have SQL2012 currently, I use &#8216;if&#8217;. Using iif would make the code shorter and I guess this uses less resources.</p>
<p>DECLARE @year int<br />
SET @year = 2012<br />
if (((@year % 4 = 0) AND (@year % 100 != 0)) OR (@year % 400 = 0))<br />
	print &#8217;1&#8242;<br />
ELSE<br />
	print &#8217;0&#8242;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Function: Is Function &#8211; SQL in Sixty Seconds #004 &#8211; Video &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257754</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Function: Is Function &#8211; SQL in Sixty Seconds #004 &#8211; Video &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Wed, 29 Feb 2012 01:31:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257754</guid>
		<description><![CDATA[[...] Comments       GA_googleFillSlot(&quot;sqlauthority_728x90&quot;);     &#171; SQL SERVER &#8211; Detecting Leap Year in T-SQL using SQL Server 2012 &#8211; IIF, EOMONTH and CONCA... [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Comments       GA_googleFillSlot(&quot;sqlauthority_728x90&quot;);     &laquo; SQL SERVER &#8211; Detecting Leap Year in T-SQL using SQL Server 2012 &#8211; IIF, EOMONTH and CONCA&#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zubair Khan</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257554</link>
		<dc:creator><![CDATA[Zubair Khan]]></dc:creator>
		<pubDate>Tue, 28 Feb 2012 09:00:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257554</guid>
		<description><![CDATA[Very interesting!!! thanks Pinal.

Is it possible to work on SQl 2008, kindly suggest]]></description>
		<content:encoded><![CDATA[<p>Very interesting!!! thanks Pinal.</p>
<p>Is it possible to work on SQl 2008, kindly suggest</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257547</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Tue, 28 Feb 2012 08:36:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257547</guid>
		<description><![CDATA[Try on SQL Server 2012.]]></description>
		<content:encoded><![CDATA[<p>Try on SQL Server 2012.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramesh K</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257525</link>
		<dc:creator><![CDATA[Ramesh K]]></dc:creator>
		<pubDate>Tue, 28 Feb 2012 07:05:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257525</guid>
		<description><![CDATA[Hi Pinal,

I just try for other simple method to find leap year... Please check the below query.

/*

Declare 
@FromYear as int
set @FromYear=&#039;2012&#039;

select 
case when
((@FromYear/4.0) /cast (@FromYear/4 as varchar(5)))= 1 then &#039;Leap Year&#039;
else &#039;Not Leap Year&#039; end

*/]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I just try for other simple method to find leap year&#8230; Please check the below query.</p>
<p>/*</p>
<p>Declare<br />
@FromYear as int<br />
set @FromYear=&#8217;2012&#8242;</p>
<p>select<br />
case when<br />
((@FromYear/4.0) /cast (@FromYear/4 as varchar(5)))= 1 then &#8216;Leap Year&#8217;<br />
else &#8216;Not Leap Year&#8217; end</p>
<p>*/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257517</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 28 Feb 2012 06:44:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257517</guid>
		<description><![CDATA[You can use any of the methods available in this post
 
http://beyondrelational.com/blogs/madhivanan/archive/2011/01/05/different-ways-to-find-out-a-leap-year.aspx]]></description>
		<content:encoded><![CDATA[<p>You can use any of the methods available in this post</p>
<p><a href="http://beyondrelational.com/blogs/madhivanan/archive/2011/01/05/different-ways-to-find-out-a-leap-year.aspx" rel="nofollow">http://beyondrelational.com/blogs/madhivanan/archive/2011/01/05/different-ways-to-find-out-a-leap-year.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257515</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 28 Feb 2012 06:43:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257515</guid>
		<description><![CDATA[Here are different methods to find out the leap year
http://beyondrelational.com/blogs/madhivanan/archive/2011/01/05/different-ways-to-find-out-a-leap-year.aspx]]></description>
		<content:encoded><![CDATA[<p>Here are different methods to find out the leap year<br />
<a href="http://beyondrelational.com/blogs/madhivanan/archive/2011/01/05/different-ways-to-find-out-a-leap-year.aspx" rel="nofollow">http://beyondrelational.com/blogs/madhivanan/archive/2011/01/05/different-ways-to-find-out-a-leap-year.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nima</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257495</link>
		<dc:creator><![CDATA[Nima]]></dc:creator>
		<pubDate>Tue, 28 Feb 2012 05:36:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257495</guid>
		<description><![CDATA[Hi Dear Pinal
can you please seperate &quot;Sql Server 2012&quot; tips and tricks in a tag?finding just Sql Server 2012 tips is difficult in you very good blog.
thanks]]></description>
		<content:encoded><![CDATA[<p>Hi Dear Pinal<br />
can you please seperate &#8220;Sql Server 2012&#8243; tips and tricks in a tag?finding just Sql Server 2012 tips is difficult in you very good blog.<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shalabh Gupta</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257482</link>
		<dc:creator><![CDATA[Shalabh Gupta]]></dc:creator>
		<pubDate>Tue, 28 Feb 2012 04:30:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257482</guid>
		<description><![CDATA[Got an error as : &#039;CONCAT&#039; is not a recognized built-in function name.]]></description>
		<content:encoded><![CDATA[<p>Got an error as : &#8216;CONCAT&#8217; is not a recognized built-in function name.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashu</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257475</link>
		<dc:creator><![CDATA[Ashu]]></dc:creator>
		<pubDate>Tue, 28 Feb 2012 04:06:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257475</guid>
		<description><![CDATA[Hi pinal
If i am using Sql Server 2008 then How can i find it.]]></description>
		<content:encoded><![CDATA[<p>Hi pinal<br />
If i am using Sql Server 2008 then How can i find it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2012/02/28/sql-server-detecting-leap-year-in-t-sql-using-sql-server-2012-iif-eomonth-and-concat-function/#comment-257466</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Tue, 28 Feb 2012 03:32:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17610#comment-257466</guid>
		<description><![CDATA[For sure try :)]]></description>
		<content:encoded><![CDATA[<p>For sure try :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
