Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
trying to calculate duration in minutes between 2 Timstamps
create Timstamp in script as below:
Timestamp(StartDate&' '&StartTime,'YYYYMMDD hh:mm') as StartStamp,
Timestamp(EndDate&' '&EndTime,'YYYYMMDD hh:mm') as EndStamp,
calculating interval in both script and layout as below
Interval(EndStamp-StartStamp,'hh:mm')
and looks ok but,
when there is a day deference result comes bad... i.e :
end stamp = 20171105 00:01
start stamp = 20171104 23:56
endstamp - startstamp retrieves : -23:54 from script calculation
or
216:06 in layout calculation
where the result is 00:06.....
would appreciate your help,
advanced thanks
Use the below instead of interval
(EndStamp-StartStamp)*1440
Hi,
=Interval(
Time( Frac( Timestamp#( '20171104 23:56', 'YYYYMMDD hh:mm')), 'hh:mm')
-
Time( Frac( Timestamp#( '20171105 00:01', 'YYYYMMDD hh:mm')), 'hh:mm')
,'hh mm')