Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date interval

suppose, I have a start date and a end date value. how do I get the duration by the interval function or if there is any other option?

example :

start time : 10:20:00 AM

end time :   2:20:00 PM

My desire output be like , Total hours : 4:00:00

Please help me.

4 Replies
tamilarasu
Champion
Champion

Hi,

try,

Expression:

Interval( Timestamp#([end time], 'hh:mm:ss tt') - Timestamp#([start time],'hh:mm:ss tt') , 'hh:mm:ss')

Load Script:

Load *,

Interval( Timestamp#([end time], 'hh:mm:ss tt') - Timestamp#([start time],'hh:mm:ss tt') , 'hh:mm:ss') as Interval

From Source;

qlikvfpi
Partner - Contributor II
Partner - Contributor II

Maybe like this :

=date(num(date('11:00','hh:mm'))-num(date('09:00','hh:mm')),'hh:mm')

Chanty4u
MVP
MVP

try this

am not sure

=Interval( Timestamp#([End Time], 'hh:mm:ss TT') - Timestamp#([Start Time],'hh:mm:ss TT') , 'hh:mm:ss')

Kushal_Chawda

=Time(frac(Time#([end time],'hh:mm:ss TT') -Time#([start time],'hh:mm:ss TT')),'hh:mm:ss')