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: 
Anonymous
Not applicable

number of days between two dates

how to dynamically calculate in a variable , number of days between year start date and month of Month(today())-2..

Since we are in July the end date should be taken as April 30 2015..

1 Solution

Accepted Solutions
MarcoWedel

=DayNumberOfYear(MonthEnd(AddMonths(Today(),-2)))

View solution in original post

8 Replies
sunny_talwar

Don't understand your questions Vinay. How many days from Year beginning to what date?

Anonymous
Not applicable
Author

i need number of days between 01-01-2015 ( start date) and 05-31-2015 (end date)... this May 31 st date should be taken dynamically. like our current date is 07-15-2015, using this today's date it has to substaract 2 months and then take end date.. So now my number of days should be 151..let me know if you need more clarifincation

MarcoWedel

=DayNumberOfYear(MonthEnd(AddMonths(Today(),-3)))

MarcoWedel

=DayNumberOfYear(MonthEnd(AddMonths(Today(),-2)))

Anonymous
Not applicable
Author

Thank you Marco

Anonymous
Not applicable
Author

Thank you Sunny for trying that

MarcoWedel

You're welcome.

regards

Marco

Anonymous
Not applicable
Author

i find this community really helpful .. helping each other..