Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
cancel
Showing results for 
Search instead for 
Did you mean: 
bi_analysts_2
Creator
Creator

Split a date into Month and Year

Hi,

i would like to create new dimension through the master item.

the new dimension is suppose to present the month and the year of another full date field that is already existing in the data set.

what is the function that i should write in order to receive such a value?

thanks,

Tal

1 Solution

Accepted Solutions
pooja_sn
Creator
Creator

MonthName(Date) will return 'MMM YYYY' eg. Mar 2016

View solution in original post

4 Replies
colin_albert

Add these lines to your load script setting the correct filed name for date_field

month(date_field)    as month,

year(date_field) as year,

sunny_talwar

For Month you need Month() and for year you can use Year(). There are other Date and Time related functions which you can find in the help section. One thing to make sure before you use these functions is that the date is read correctly by QlikView

Why don’t my dates work?

Get the Dates Right

pooja_sn
Creator
Creator

MonthName(Date) will return 'MMM YYYY' eg. Mar 2016

View solution in original post

Not applicable

Hi

Try below code in scripting



Month(datefield) as Month,

Year(datefield) as Year