Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
Valued Contributor

Re: Addmonths function in qlikview variable

Hi,

You can also try this way:

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

8 Replies
cesaraccardi
Valued Contributor

Re: Addmonths function in qlikview variable

Hi,

try

=addmonths($(vdate),1)

Regards,

Cesar

Not applicable

Re: Addmonths function in qlikview variable

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

Re: Addmonths function in qlikview variable

Try this

=Addmonths(vdate,1)

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

Not applicable

Re: Addmonths function in qlikview variable

MMM-YYYY

Re: Addmonths function in qlikview variable

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

cesaraccardi
Valued Contributor

Re: Addmonths function in qlikview variable

Hi,

You can also try this way:

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

Not applicable

Re: Addmonths function in qlikview variable

Hi

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

thanks

Not applicable

Re: Addmonths function in qlikview variable

Hi Cesar

It worked,

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

Thanks all for all your help.

Community Browser