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

Variable with Previous Month

Hi All

I was trying to set a variable in my script

LET vPreviousMonth =   (Month(TODAY())-1);

LET vPreviousMonth1 =   Month(TODAY());

but

vPreviousMonth1 = Mar


I want it to say Feb so i try vPreviousMonth  but this comes as 2....any ideas how i can change it to say Feb and not 2?


Thanks



1 Solution

Accepted Solutions
sunny_talwar

Try this:

LET vPreviousMonth =   Month(AddMonths(Today(), -1));

View solution in original post

4 Replies
sunny_talwar

Try this:

LET vPreviousMonth =   Month(AddMonths(Today(), -1));

Anonymous
Not applicable
Author

Thanks...as always Sunny...You're a Star!

sunny_talwar

I am glad you think so .

Anonymous
Not applicable
Author

I think you deserve it, The Amount of times you answered my questions and soooo Quickly