Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
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?
Best regards
Mårten
(Time2-Time1)*1440
(Time2-Time1)*1440
Use interval( A-B, 'mm' ) where A = 08:40 and B = 08:30 will return 10.
Hi,
USe interval()
like interval(time2-time1,'hh:mm')
Regards
Hi,
Try like this
=Interval(Timestamp#('08:40', 'hh:mm') - Timestamp#('08:30', 'hh:mm') , 'm')
To get this in script try like below
Data:
LOAD
*,
Interval(Timestamp#(Time2, 'hh:mm') - Timestamp#(Time1, 'hh:mm') , 'm') AS DiffInMinutes
FROM DataSource;
Hope this helps you.
Regards,
jagan.
Hi
Use Interval Function:
=Interval('08:40'-'08:30','mm')&' ' &'minutes'
Result is as follows:
Hope that helps you.
Regards
Av7eN
Hi,
Interval function is best for minute difference if the records in the same field then use Peek function to find that
LOAD
Time#( TimeField,'hh:mm' ) as TimeField, Interval(TimeField - Peek('TimeField'),'mm') as Diff,
LOAD * Inline
[
TimeField
08:30
08:40
];
If not then simple use
Time#(Time1,'hh:mm' ) as Time1,Time#(Time2,'hh:mm' ) as Time2,
Interval(Time2 - Time1,'mm') as Diff2;
Regards
Anand
=Interval(Time#('08:40','hh:mm')-Time#('08:30','hh:mm'),'mm')
Thanks all!
Welcome!!!!!!!!!!!!!!