Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
s33pie007
Creator
Creator

How to add months to YYYYMM format

Hello everyone,

I have the following date format: YYYYMM. I would like to add a month to this format,

but it doesnt seem to work correctly.

for example, if I have a date 201201, the new value must be 201202.

If I have a date 201212, the new value must be 201301.

Help will be appreciated.

Thanks,

Stefan

6 Replies
Anonymous
Not applicable

use this expression

addmonths(date#(yourdates,'YYYYMM',1)

sunny_talwar

and to format is again as YYYYMM, you can use Date() function

Date(AddMonths(Date#(yourdates,'YYYYMM',1), 'YYYYMM')

Not applicable

=Date(MonthEnd(Date#(YourValue, 'YYYYMM'))+1, 'YYYYMM')

nareshthavidishetty
Creator III
Creator III

Not getting the required format.

Thanks..

olivierrobin
Specialist III
Specialist III

maybe that

let m=201212;

let m1=date(AddMonths(date#(m*100+1,'YYYYMMDD'),1),'YYYYMM');

sunny_talwar

Thanks for providing this information