Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Convert 201501 to Jan

How can I take a YearMonthId = 201501 and convert it to the month of Jan?

Thanks,

Joe

Tags (4)
1 Solution

Accepted Solutions
Partner
Partner

Re: Convert 201501 to Jan

Do you mean only the Month() without Year info?=>

=month(date#(201501,'YYYYMM'))

View solution in original post

5 Replies
Partner
Partner

Re: Convert 201501 to Jan

Do you mean only the Month() without Year info?=>

=month(date#(201501,'YYYYMM'))

View solution in original post

Not applicable

Re: Convert 201501 to Jan

I separated it out to the last 2 characters using right(YearMonthId, 2) now how do I convert this 01 to January?

Not applicable

Re: Convert 201501 to Jan

Thank you. Much appreciated. Serious brainfart on that one.

Joe

Partner
Partner

Re: Convert 201501 to Jan

If you have only the number you need creation of date/timestamp if you want to use month(). You can create string and use functions like date#() oder you use makedate() with a fix year.

You can also use the defined Monthnames from the beginning of youre Skript, generatet by qlick.

=subfield(MonthNames,';',01)

Re: Convert 201501 to Jan

converting 01 to January could be done like:


QlikCommunity_Thread_148715_Pic1.JPG


=Month(Date#('01','MM'))


hope this helps


regards


Marco