- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
I tried to implement what you suggested, but now it just constantly shows a 0. Here is what I added to my FormCalc;
var fullTime = 0
if (Table1.Row4.Cell2 ne null and Table1.Row5.Cell2 ne null) then
if (Time2Num(Table1.Row4.Cell2.formattedValue, "HH:MM") lt Time2Num(Table1.Row5.Cell2.formattedValue, "HH:MM")) then
fullTime = Abs(Time2Num(Table1.Row4.Cell2.formattedValue, "HH:MM") - Time2Num(Table1.Row5.Cell2.formattedValue, "HH:MM")) / (60 * 60 * 1000)
else
fullTime = 24 - Abs(Time2Num(Table1.Row5.Cell2.formattedValue, "HH:MM") - Time2Num(Table1.Row4.Cell2.formattedValue, "HH:MM")) / (60 * 60 * 1000)
endif
endif
if (Table1.Row6.Cell2 ne null and Table1.Row7.Cell2 ne null) then
if (Time2Num(Table1.Row6.Cell2.formattedValue, "HH:MM") lt Time2Num(Table1.Row7.Cell2.formattedValue, "HH:MM")) then
fullTime = fullTime + Abs(Time2Num(Table1.Row6.Cell2.formattedValue, "HH:MM") - Time2Num(Table1.Row7.Cell2.formattedValue, "HH:MM")) / (60 * 60 * 1000)
else
fullTime = fullTime + 24 - Abs(Table1.Row7.Cell2(EndTime.formattedValue, "HH:MM") - Time2Num(Table1.Row6.Cell2.formattedValue, "HH:MM")) / (60 * 60 * 1000)
endif
endif
if (Table1.Row8.Cell2 ne null and Table1.Row9.Cell2 ne null) then
if (Time2Num(Table1.Row8.Cell2.formattedValue, "HH:MM") lt Time2Num(Table1.Row9.Cell2.formattedValue, "HH:MM")) then
fullTime = fullTime + Abs(Time2Num(Table1.Row8.Cell2.formattedValue, "HH:MM") - Time2Num(Table1.Row9.Cell2.formattedValue, "HH:MM")) / (60 * 60 * 1000)
else
fullTime = fullTime + 24 - Abs(Table1.Row9.Cell2(EndTime.formattedValue, "HH:MM") - Time2Num(Table1.Row8.Cell2.formattedValue, "HH:MM")) / (60 * 60 * 1000)
endif
endif
if (Table1.Row10.Cell2 ne null and Table1.Row11.Cell2 ne null) then
if (Time2Num(Table1.Row10.Cell2.formattedValue, "HH:MM") lt Time2Num(Table1.Row11.Cell2.formattedValue, "HH:MM")) then
fullTime = fullTime + Abs(Time2Num(Table1.Row10.Cell2.formattedValue, "HH:MM") - Time2Num(Table1.Row11.Cell2.formattedValue, "HH:MM")) / (60 * 60 * 1000)
else
fullTime = fullTime + 24 - Abs(Table1.Row11.Cell2(EndTime.formattedValue, "HH:MM") - Time2Num(Table1.Row10.Cell2.formattedValue, "HH:MM")) / (60 * 60 * 1000)
endif
endif
$ = fullTime
Views
Replies
Total Likes