
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to calculate days
How to calculate "2023/04/01"-"2023/03/02"?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @louise119
To calculate the number of days between two dates in Qlik Sense, you can use the following formula:
=Date#('2023/04/01', 'YYYY/MM/DD') - Date#('2023/03/02', 'YYYY/MM/DD')
This formula uses the Date#
function to convert the dates from text format to date format, and then subtracts the earlier date from the later date to get the number of days in between.
Alternatively, you can use the Interval
function to calculate the interval between two dates in a specific unit, such as days:
=Interval('2023/04/01' - '2023/03/02', 'DD')
This formula subtracts the earlier date from the later date and returns the interval in days.
Both of these formulas should give you the same result, which is 30.
Don't forget to mark a solution that worked for you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
=Interval(Date(2023/04/01,'MM/DD/YYYY')- Date(2023/03/02,'MM/DD/YYYY'),'DD')
=Floor(Date(2023/04/01,'YYYY/MM/DD')- Date(2023/03/02,'YYYY/MM/DD'))
