Discussion Board for collaboration related to QlikView App Development.
Probably an easy one, I have two times, 08:30 and 08:40 and want to get the minutes between, 10 minutes in this case. How ca I calculate that in an expression?
Try like this
=Interval(Timestamp#('08:40', 'hh:mm') - Timestamp#('08:30', 'hh:mm') , 'm')
To get this in script try like below
Interval(Timestamp#(Time2, 'hh:mm') - Timestamp#(Time1, 'hh:mm') , 'm') AS DiffInMinutes
Hope this helps you.
Interval function is best for minute difference if the records in the same field then use Peek function to find that
Time#( TimeField,'hh:mm' ) as TimeField, Interval(TimeField - Peek('TimeField'),'mm') as Diff,
LOAD * Inline
If not then simple use
Time#(Time1,'hh:mm' ) as Time1,Time#(Time2,'hh:mm' ) as Time2,
Interval(Time2 - Time1,'mm') as Diff2;