Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

johnsmithqv
New Contributor III

yes

yes

1 Solution

Accepted Solutions
MVP
MVP

Re: How to derive year & Month fields seperately in yearmonth field

Try like:

Load

          Year(Date#(YeraMonth, 'MMMYYYY')) as Year,

          Month(Date#(YeraMonth, 'MMMYYYY')) as Month

Edit: Added a missing 'Y' in the format

View solution in original post

3 Replies

Re: How to derive year & Month fields seperately in yearmonth field

Try with this way

Noconcatenate

Load

*,

Right(YeraMonth,4) as Year

Left(YeraMonth,3) as Month

Resident Source;


Drop table Source;



Regards

Anand


MVP
MVP

Re: How to derive year & Month fields seperately in yearmonth field

Try like:

Load

          Year(Date#(YeraMonth, 'MMMYYYY')) as Year,

          Month(Date#(YeraMonth, 'MMMYYYY')) as Month

Edit: Added a missing 'Y' in the format

View solution in original post

MVP
MVP

Re: How to derive year & Month fields seperately in yearmonth field

This way, Month would be a text field and we should avoid that.