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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating number of days between two date fields

Hi ... I want to calculate the number of days between two date fields in MM/DD/YYYY format.

What would be the best way ?

Thanks

1 Solution

Accepted Solutions
eromiyasimon
Creator II
Creator II

=date(Field_name,'MM/DD/YYYY')- date(Field_name,'MM/DD/YYYY')

View solution in original post

2 Replies
marcus_sommer

(Real) dates are just numbers - therefore you could calculate: Date2 - Date1. If they are not dates than you need to convert them with date#() and maybe with floor() to cut a time-part.

- Marcus

eromiyasimon
Creator II
Creator II

=date(Field_name,'MM/DD/YYYY')- date(Field_name,'MM/DD/YYYY')