Hi…I have a startdate and enddate field on a leave application form…calculating these two dates is fine. We now require a half day…does anyone know an easy way to work this out in Notes…have looked on forums but have not had much luck. I am using formula language.
Thanks
C
Subject: Calculate Half Days
Could you describe what you need in more detail? Just how do half-days fit into this?
Subject: Calculate Half Days
@Adjust( your_field_with_the_start_date ; 0;0;0;12;0;0)
ST
Subject: RE: Calculate Half Days
HiI have a checkbox with the value of HalfDay|1, how would I incorporate the above into this formula…have tried with not much luck tho…
diffDays := @If(LeaveFrom = “” | LeaveTo = “” ; “” ; ((LeaveTo - LeaveFrom) / 86400) + 1);
strtDay := @If(diffDays = “”;“”;@Modulo(@Weekday(LeaveFrom); 7));
endDay := @If(diffDays = “”;“”;@Modulo(@Weekday(LeaveTo); 7));
result := @If(diffDays = “”;0;(diffDays - endDay + strtDay - 8) * 5 / 7 - @Max(-2; -strtDay) - @Min(1; endDay) + 5 - strtDay + endDay);
result
Thanks…C
Subject: It would seem HOURS is the next step, e.g. 4.