Hi Paul,

Overtime you can calculate with:

``````var wh = @Work Hours ;
wh > 8 && wh <=12 ? wh - 8 : wh > 12 ? 12 : 0
``````

If wh = 10.5, the overtime result is 2.5, but if wh = 12.5, the result is 12.
I'm not sure which result you expect if wh > 12.

If you want to double time which is over 12 you can use:

wh > 8 && wh <=12 ? wh - 8 : wh > 12 ? 4+ ((wh-12)*2) : 0

Result for wh = 12.5 is 5 . Is that the result you expect?

Rainer
rg@delos-consulting.com

Thanks Rainer.. Sorry. Wanst clear on that.. was simply looking for

var th = @Total Hours;
th > 12 ? th - 12 : 0

I wanted to do a similar calculation off of @total hours that would simply show 8 hours if total time was > 8

I thought it would just be

var th = @Total Hours;
th > 8 ? 8 : (else do nothing?)

Hi Paul,

``````th > 8 ? 8 : ""
``````

Rainer

Thanks again Rainer. This gives a result of 8 for any value over 8 and "" for any value under. What if I still want to return a lower value? 7 = 7 but 9 = 8

Hi Paul,

``````th > 8 ? 8 : th
``````

if th = 9 -> result: 8, if th = 8 -> result: 8, if th = 7 -> result: 7