Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have 2 datetime fields and I want to calculate difference between 2 fields of time
ex: date1 = 2010-11-19 09:22:09.000 date2 : 2010-11-19 11:52:38.000
then date3 =date2- date1 i.e (11:52:38.000-09:22:09.000).
how to caluclate it.
Hi Pankaj,
Did you try interval(EndTime-StartTime, 'hh','mm')
OR
Timestamp(Timestamp#(EndDateTime) - Timestamp#(StartDateTime), 'hh:mm:ss')
Khan
HI
I tried first one but some times it shows wrong means
Ex : Date1 = 12:56, Date2 : 19.43 then date3 returns = 6:47 but actually value is = 6:87
time(frac(date2) - frac(date1))
Hi Pankaj,
there is the Interval function, that calculates the difference between 2 dates:
Try using as below:
Interval( Date('2010-11-19 09:22:09.000') - Date( '2010-11-19 11:52:38.000'), 'hh:mm:ss')
Interval( Date('19:43') - Date( '12:56'), 'hh:mm:ss')