Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Addmonths function in qlikview variable

Hi

I am trying to use addmonths in the variable that i have created.The below does not work:

=addmonths($(vdate,1))

=$(addmonths(vdate,1))

Please assist.

1 Solution

Accepted Solutions
cesaraccardi
Specialist
Specialist

Hi,

You can also try this way:

=addmonths(Date#('$(vdate)','MMM-YYYY'),1)

View solution in original post

8 Replies
cesaraccardi
Specialist
Specialist

Hi,

try

=addmonths($(vdate),1)

Regards,

Cesar

Not applicable
Author

Thanks,it didn't work as well.Gosh i spent the whole day trying to figure this out.I am about to crash!!

CELAMBARASAN
Partner - Champion
Partner - Champion

Try this

=Addmonths(vdate,1)

Can you tell me how you stored the date in vdate variable?

Not applicable
Author

MMM-YYYY

MayilVahanan

Hi

     Try like this

    

     if vdate -> Date(today(),'MMM-YYYY')

     Date(AddMonths(vdate,1),'MMM-YYYY')  , it gives AddMonths(vdate,1) -> 8/31/2012

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
cesaraccardi
Specialist
Specialist

Hi,

You can also try this way:

=addmonths(Date#('$(vdate)','MMM-YYYY'),1)

Not applicable
Author

Hi

This works but bring the date in 01/01/2000 format,i want it to be Jan-2000

thanks

Not applicable
Author

Hi Cesar

It worked,

=date(addmonths(Date#('$(vdate)','MMM-YYYY'),1),'MMM-YYYY')

Thanks all for all your help.