Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

jleefjcapital
Contributor

How do I concatenate a quarter and year column and convert into date?

I'm trying to concatenate a row containing the quarter (Q1, Q2, Q3, Q4) and year (1990,1991,...) and turn it into a date.  I tried using the following code:

Date(Makedate("Year"), 'YYYY') as YEAR,

Date(Makedate("Year",right(Qrt,2)), 'QQYYYY') as QuarterYEAR,

It's not working as intended.  What am I doing wrong?

3 Replies
MVP
MVP

Re: How do I concatenate a quarter and year column and convert into date?

May be this

"Year" as YEAR,

Date(MakeDate("Year", (Right(Qrt, 1) * 3)), 'MMYYYY') as MonthYEAR,

jleefjcapital
Contributor

Re: How do I concatenate a quarter and year column and convert into date?

It worked!  It is possible to get the add a "/"?   Currently, format is '032013'. 

MVP
MVP

Re: How do I concatenate a quarter and year column and convert into date?

May be this

"Year" as YEAR,

Date(MakeDate("Year", (Right(Qrt, 1) * 3)), 'MM/YYYY') as MonthYEAR,