I have 3 parameters in a report:
1. {?FromDate}
2. {?ToDate}
3. {?DayWeek} (a 3 letter representation of a day i.e. "Sun")
I need to calculate the number of times the specific {?DayWeek} day occurs between {?FromDate} and {?ToDate}. If the {?DayWeek} occurs on the {?FromDate} or {?ToDate}, it should be counted.
So between 5/2/2010 and 5/11/2010 if the {?DayWeek} param was "Tue", I need a return of 2 but if it was "Wed", I would expecct a return of 1.
I looked at other posts regarding counting business days between two dates but I can't figure a good way to modify that logic to fit this scenario. This formula will be at the beginning of the report so it can be referenced many other places.
Any help is appreciated!
1. {?FromDate}
2. {?ToDate}
3. {?DayWeek} (a 3 letter representation of a day i.e. "Sun")
I need to calculate the number of times the specific {?DayWeek} day occurs between {?FromDate} and {?ToDate}. If the {?DayWeek} occurs on the {?FromDate} or {?ToDate}, it should be counted.
So between 5/2/2010 and 5/11/2010 if the {?DayWeek} param was "Tue", I need a return of 2 but if it was "Wed", I would expecct a return of 1.
I looked at other posts regarding counting business days between two dates but I can't figure a good way to modify that logic to fit this scenario. This formula will be at the beginning of the report so it can be referenced many other places.
Any help is appreciated!