Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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
Specialist III
Specialist III

Hi @Carlaf_93 , please try this :

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

QFabian

View solution in original post

1 Reply
QFabian
Specialist III
Specialist III

Hi @Carlaf_93 , please try this :

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

QFabian