Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dates and Holidays

Status
Not open for further replies.

KOVMoe

Programmer
Jun 30, 2004
34
US
I have begun a quest to figure out holidays, in CFM only. I have to present reports that will, on Monday Mornings, show last week. Not a problem. But the upcoming Holiday does throw a wrench in the works. New Years, 4th of July, Christmas and New Years Eve are all easy. How do I go about figuring Memorial Day, Labor Day, Thanksgiving and the Friday after Thanksgiving?

Thank you,

[king]Moe-King of the Village Idiots.

"When in trouble,
when in doubt;
Run in circles-
SCREAM & SHOUT!!"
Burma Shave
 
use a calendar table, with one row per date and a holiday flag (with optional varchar field for holiday name)

you will have to populate it with a few years of data, but this is a trivial exercise which will likely take less time than writing the code to call all the necessary functions (like isEaster, isLabourDay, isThanksgiving, etc.)

i usually do it in Excel (because of its neat "series" function which can increment dates) and then import the data

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top