Date counting calculation issue
At some point I was pointed to a thread that had a calculation that counted WEEKDAYS ONLY and there seems to be an issue with it. Maybe I didn't copy it over properly or added in something incorrectly or by accident but here it is:
5 * Int ( ( End Date - Start Date ) / 7 ) +Middle ( "0012345501234544012343340123223401111234010012340" ; 7 * (DayOfWeek ( Start Date ) - 1 ) + DayOfWeek ( End Date ) ; 1 ) + 1 - Count (Holidays_Time Off::Date)
As far as I know, all I did was add "+1" before the "- Count (" at the end of the formula to make sure I saw 1 day when the start and end day was on the same day.
My issue is when I have my end date on a Sunday. Say my start day is Friday and end day Sunday it will show 2. If I change it to Monday it stays on 2. If I change it to Saturday it goes down to 1. So it seems to count Monday in whether your on Sunday or Monday.
Let me know if I've done something wrong. Thanks!