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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
jleefjcapital
Creator II
Creator II

Combining Year and Month Columns into a single Date column

Hello,

I'm trying to format my dates from the various data sources I'm getting my data from.  One data source represents the date by two separate columns (Year and Month).  I would like to combine these two columns into a single one, but also change the month format. 

For instance,

Year = YYYY

Month = M01

Date = JanYYYY

I hope someone could help me with this.

Thank you,

Jessica

1 Reply
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Jessica,

your solution will include two parts:

1. Build a proper date field

2. Format the date field in the required way.

In order to build the proper date field, use the MakeDate function and only use the last 2 characters of the Month:

MakeDate(Year, Right(Month, 2))

Then enclose the same in the formatting function Date():

Date(MakeDate(Year, Right(Month, 2)), 'MMMYYYY')

That will do the job.

cheers,

Oleg Troyansky

Learn advanced QlikView and Qlik Sense techniques in my book QlikView Your Business

Ask me about Qlik Sense Expert Class!