Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

greend21
Contributor II

Make Date from 3 character Month; Ex: Apr

I have a year field and a month field that shows Jan, Feb, Mar, Apr, etx. My load script also already has :

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

It is probably easy but I cannot seem to get these fields in a format such as Apr 2017. The issue is I need to create a rolling 12 month flag so I didnt think Month&' '&Year would work. Any help is appreciated.

Thank you!

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Make Date from 3 character Month; Ex: Apr

If you have a year field too, try like:

Load

          MonthName(MakeDate(YearField, Month(Date#(MonthField, 'MMM'))) as MonthName

3 Replies
MVP
MVP

Re: Make Date from 3 character Month; Ex: Apr

If you have a year field too, try like:

Load

          MonthName(MakeDate(YearField, Month(Date#(MonthField, 'MMM'))) as MonthName

Re: Make Date from 3 character Month; Ex: Apr

You need to do like below? MonthName(DateField) as MonthName

Life is so rich, and we need to respect to the life !!!

Re: Make Date from 3 character Month; Ex: Apr

Or you can try this

Date(Date#(Month&Year, 'MMMYYYY'), 'MMM YYYY') as MonthYear

Community Browser