June 21, 2011 at 10:07 pm
Comments posted to this topic are about the item Holiday List
June 22, 2011 at 6:27 am
This function has Fathers' Day on 6/12 this year. It was actually on the 19th. I don't have the time to check the rest.
June 22, 2011 at 7:07 am
Thanks, I thought that had been fixed, but I think I sent the script prior to the fix....
Father's day is actually the third Sunday in June, the script has the second Sunday....
IF @nYear>=1910 INSERT INTO @Holidays (Holiday_name,Holiday_date)
????VALUES ('Fathers Day',dbo.FloatingDate(2,1,6,@nYear)) -- 2nd Sundy in June
Change the dbo.FloatingDate(2,1,6,@nYear) to
dbo.FloatingDate(3,1,6,@nYear)
and tweak the comment...
June 22, 2011 at 7:18 am
A nice addition would be a "Federal" bit column or maybe a @FederalOnly parameter.
June 23, 2011 at 12:49 pm
They're not exactly holidays but the start and end of daylight savings time. Maybe I'll see if I can tack it on.
Ken
June 24, 2011 at 8:54 am
Good suggestion, I'll take a look and see if I can add that and submit a revised script...
Thanks...
Hope you found the function helpful
June 24, 2011 at 10:34 am
Joe, definitely a useful script. Some weird things when in the formatting of indentations. I copied all the code out of the block and pasted it into SSMS. Won't compile due to the way those line leading tabs or spaces are interpreted. Maybe something on my end.
Ken
June 24, 2011 at 10:40 am
ken.trock (6/24/2011)
Joe, definitely a useful script. Some weird things when in the formatting of indentations. I copied all the code out of the block and pasted it into SSMS. Won't compile due to the way those line leading tabs or spaces are interpreted. Maybe something on my end.Ken
That happens from time to time with scripts on SSC.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 24, 2011 at 10:40 am
Nice script - thanks for sharing.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 24, 2011 at 3:12 pm
I fixed the script to handle Father's Day properly
I revised the script to handle daylight savings start and end dates...
I also replaced all tabs with spaces, so hopefully that will allow it to load without errors
June 27, 2011 at 2:52 pm
A couple lingering tabs in the new daylight savings calculation but otherwise working well. Thanks!
Ken
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply