ginkoba
Technical User
- Jan 29, 2009
- 60
Hi all,
I have a code that calculates the work days excluding saturdays and sundays. See code below. However, I want to further modify this so that "D1" would subtract 28 days for months 4,6,9,11 and 30 days for months 1,3,5,7,8,10,12 and so on and so forth. Please assist.
Local DateTimeVar d1 := CurrentDate-30;
Local DateTimeVar d2 := CurrentDate;
DateDiff ("d", d1, d2) -
DateDiff ("ww", d1, d2, crSaturday) -
DateDiff ("ww", d1, d2, crSunday)
I have a code that calculates the work days excluding saturdays and sundays. See code below. However, I want to further modify this so that "D1" would subtract 28 days for months 4,6,9,11 and 30 days for months 1,3,5,7,8,10,12 and so on and so forth. Please assist.
Local DateTimeVar d1 := CurrentDate-30;
Local DateTimeVar d2 := CurrentDate;
DateDiff ("d", d1, d2) -
DateDiff ("ww", d1, d2, crSaturday) -
DateDiff ("ww", d1, d2, crSunday)