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: 
Carlaf_93
Creator II
Creator II

date format

Good morning,

i'm writing a date like this:  01/01/2018 in a variable

i would like to calculate a year before from this in another variable.

It works if i define it like: variable2= $(variable1)-345 but i would like to set like year()-1

Any ideas?

1 Solution

Accepted Solutions
QFabian
MVP
MVP

Hi @Carlaf_93 , please try this :

variable2 = addmonths($(variable1), -12)

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.

View solution in original post

1 Reply
QFabian
MVP
MVP

Hi @Carlaf_93 , please try this :

variable2 = addmonths($(variable1), -12)

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.