Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
DS14
Partner - Contributor III
Partner - Contributor III

Require month and year only

Hi Experts,

I have the field with values in below format, from which I need extract only Month and year.

Month
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No
Field2_Mar-18 No

 

Please suggest.

Thanks in advance.

Labels (1)
1 Solution

Accepted Solutions
JordyWegman
Partner - Master
Partner - Master

Hi Deepaksingh,

Do you want them separate? Then use this:

Left(Right(Month,9),3) as Month

Year(20 & Left(Right(Month,5),2)) as Year

If you want the combination then use this:

Left(Right(Month,9),6) as YearMonth

Jordy

Climber

Work smarter, not harder

View solution in original post

1 Reply
JordyWegman
Partner - Master
Partner - Master

Hi Deepaksingh,

Do you want them separate? Then use this:

Left(Right(Month,9),3) as Month

Year(20 & Left(Right(Month,5),2)) as Year

If you want the combination then use this:

Left(Right(Month,9),6) as YearMonth

Jordy

Climber

Work smarter, not harder