June 20, 2008 at 8:37 am
Comments posted to this topic are about the item Is_Leap Function
August 12, 2008 at 2:52 am
Or alternatively this:
select IsLeapYear = case when day(dateadd(day,-1,dateadd(month,2,dateadd(year,@year-1900,0)))) = 29 then 1 else 0 end
Which basically calculates the day before March 1st.
Nigel
How to post questions
August 13, 2008 at 1:25 pm
I Liked it 🙂
August 19, 2008 at 3:09 am
You could get the same result from something like
isdate(cast(@year as char(4)) + '-02-29')
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply