I've got a report that bumps projected cash from Weekends to Weekdays. However, I would like to make sure that the day isn't a holiday either.
How can I test if a date falls on a Weekend or Holiday, and move it to the next business day if necessary?I would create a table in your database labeled "Holidays" and list all the holidays you want to include. Add that table to your report and compare them kind of like the way you're doing it with the weekends already except insead of using the WeekDay function (A.K.A. DayOfWeek) and finding the number corresponding to the day - just compare each date record with each date in the holiday table using a for loop. Hope that isn't too vague. If so, I'll be a little more specific. Good luck. :)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment