Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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
Partner - Champion III
Partner - Champion III

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...