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

Difference between two dates

Hello,

I want to differentiate between two dates which are in timestamp format and display the difference value in "Days"

Example:-

Field 1 = 4/11/2013 12:40:36

Field 2 = 4/16/2013 12:00:00

Difference value should be "5 days". Any idea?

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

     Interval(Field2 - Field1 ,'D') as Diff_in_Days.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jagan
Luminary Alumni
Luminary Alumni

Hi,

I think this is the duplicate post, anyway try like this

=Ceil(Interval(Date#('4/16/2013 12:00:00', 'MM/DD/YYYY hh:mm:ss') - Date#('4/11/2013 12:40:32', 'MM/DD/YYYY hh:mm:ss'), 'DD' ))

Hope this helps you.

Regards,

Jagan.

richard
Partner - Creator
Partner - Creator

Try this example app...