I have a Calendar table. I would like get 2 business before Today’s Date while skipping Holidays and weekeends.
For example:
Example 1: New years 2013 falls on a Tuesday. If it was Thursday (1/3), then my starting date would be Monday (12/31).
Example 2: If it was Monday (12/31), then my starting date would be Thursday (12/27).
My Clandar table as been prepopulated with 30 years worth of dates and have flags to determine which ones are weekend and hollidays. The table has these fields:
dt: Date and time for 30 years
Y: year
D: Day
M: Month
Isholiday: (Is a holiday are not, flagged with 0 for “no” and 1 for “Yes”)
IsWeekday: (Is a weekday? Flagged with 0 for “no” and 1 for “Yes”
HolidayDescritption: Holiday Names
Please help.
This is what you want :
Make sure to replace
*with only the fields that you want.