Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everybody,
I have a calculation where I sum up numbers (in s) to hours (by dividing by 3600) so something like this:
((sum(if(LabelField1='sec',valueField1)))/3600)
Which returns a number like 51.473
The customer wants to see this now in the format hh;mm;ss though.
When changing the presentation to Time i get 11:21:36
Also, since I already calculate it in hrs that change would be wrong anyway.
Does anybody know how to convert the 51.473 (hrs) to hh;mm;ss time format?
interval(((sum(if(LabelField1='sec',valueField1)))/3600) / 24, 'hh:mm:ss')
or expression without interval, format as interval in number tab
((sum(if(LabelField1='sec',valueField1)))/3600) / 24
51.473 / 24
then use interval to format
interval (51473/24, 'hh:mm:ss')
so you mean change the formular to:
Interval((sum(if(LabelField1='sec',valueField1)))/3600,'hh:mm:ss')
?
because this is not changing anything.
Interval((sum(if(LabelField1='sec',valueField1)))/(3600*24),'hh:mm:ss')
This will change your time to number of days (before decimal part) and after decimal part will be time part.
interval(((sum(if(LabelField1='sec',valueField1)))/3600) / 24, 'hh:mm:ss')
or expression without interval, format as interval in number tab
((sum(if(LabelField1='sec',valueField1)))/3600) / 24
Interval(Interval#(Sum({$<LabelField1={'sec'}>} valueField1) ,'s'))
hope this helps
regards
Marco
Thanks Massimo... I used the second option.. Was easier
one performance comparison between the initial Sum(If()) expression and a set expression version:
test data:
set expression:
Sum(If())
hope this helps
regards
Marco