
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
difference in months
Hi Folks,
i have a following case, i have 2 Fields: From Date and To Date,
case 1:
From_Date To_Date
21.03.2015 25.03.2015
if i use this procedure :
Date(Date#(From_Date, 'DD.MM.YYYY'))as From_Date,
Date(Date#(To_Date, 'DD.MM.YYYY'))as To_Date,
Num(To_Date) - Num (From_Date), so i can calcualte the Difference in Days, and it does work great
Problem Case:
From_Date To_Date
06.10.2017 06.05.2019 > How can i calculate in this case the Difference in months
Thanks a lot for any feedback and help
Beck
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
i think you should look into this solution which is interesting too and try to replicate that in your app.
How Do I Get the Number of Months Between Two Dates?
regards
Pradosh


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
date_diff --->Num(To_Date) - Num (From_Date)
you can divide your date_diff/12 and ceil(date_diff/12),floor(date_diff/12) depending upon you want to include the current month or not.
regards
Pradosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pradosh,
thanks a lot for your responce, but i dont understand this procedure, the funct: datediff i can normally use in excell but not in Qlik Sense
Thanks a lot
Beck


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
i think you should look into this solution which is interesting too and try to replicate that in your app.
How Do I Get the Number of Months Between Two Dates?
regards
Pradosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Prodosh Mate, thanks a lot for your responce and helps, it does work
have a nice day
kindly
Beck

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This Issue is solved, Solution can be found here: Difference in Month
