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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getdate

Hi,

I want to make a date that is 12 month back and 36 month back.

If I write 12 as below I get -12 days.

Instead I want to remake 12 as month. How do I do that?

getdate()-12 as 12_month_back__date,

/Julia

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

addmonths(today(),-12)  as 12_month_back_date

addyears(today(),-3) as 3_year_back_date


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

addmonths(today(),-12)  as 12_month_back_date

addyears(today(),-3) as 3_year_back_date


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi Peter,

you can use the function

addmonth(max(Date),-12)

Regards

Arun Reddy

Not applicable
Author

Thanks!

/Julia