|
In my vacation database, I work out the difference between two taking in to account weekends etc - all coutesy of Dessie.
I have introduced a Half Day field that people naturally take - either morning or afternoon.
What I need to be able to do is show that in the calculation.
Here is Dessie's work of art
=IF(AND((WEEKDAY(To,2))<(WEEKDAY(From,2)),((WEEKDAY(From,2))-(WEEKDAY(To,2)))>1),(((DATEDIF(From,To,"D")+1))-(FLOOR((DATEDIF(From,To,"D")+1)/7,1)*2)-2),(((DATEDIF(From,To,"D")+1))-(FLOOR((DATEDIF(From,To,"D")+1)/7,1)*2)))
Any help would be appreciated.
Iain
|