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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
josephinetedesc
Creator III
Creator III

calendar question

Hi All

LET vDateMin = Num(Date(Floor(Today()- 390)));

This works but hard codes the fact that I want (-13 months).

390 is close enough but not accurate!  Is there a way I can ju8st take away 13 months?

Jo

11 Replies
its_anandrjs
Champion III
Champion III

Then try some of this

This gives Today month minus 13 months and output will be 13 month back Day

LET vMinDate = Day(AddMonths(Today(), -13));


This gives Date after 13 months back

LET vMinDate = Date(AddMonths(Today(), -13));


This gives Year after 13 months back

LET vMinDate = Year(AddMonths(Today(), -13));


josephinetedesc
Creator III
Creator III
Author

something odd happens and I will need to explore:

when I use this expresssion

LET vMinDate = Day(AddMonths(Today(), -13));




I then get months appearing all the way back to 2011 - but this could be some other 'glitch'.


It works when hard code  date (today - 440) - but obviously not a good idea!

I will work on it some more ...

Jo


but

when I add this to a text box = Day(AddMonths(Today(), -13)) I get 14???

and this added to a text box   =Date(AddMonths(Today(), -13))) does not work ...