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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Don't count weekends/holidays in date formula ? 1

Status
Not open for further replies.

TheLibrary

Programmer
Nov 19, 2003
37
US
I have a formula to check if a date is less than 3 days into the future.

If {Date} < today()+3 then &quot;hot&quot; else &quot;ok&quot;

How do I make the formula overlook weekends and holidays?
(only check for &quot;workdays&quot; on my company calendar)

Advice?
 
As part of every reporting system I always create a Periods table. You'll see that I've made references to this to resolve numerous issues in reporting.

Basically you build a table of all dates, with whatever meaningful attributes required, such as weekend, holiday, fiscal day, etc.

Now you can always join to or from this table to allow for more intelligent reporting.

This is standard fare in Data Warehousing, and will prevent you from hard coding solutions.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top