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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Making a date from Quarter and Year

Hi,

Another date related question from me, hope someone can help.

In my data I have two columns: Quarter and Year. How can I make a date from them where the date will be the last month of each quarter?

For example Q4 2014 would be 01.12.2014, Q3 2014 would be 01.09.2014.

Many thanks

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

=Date(MakeDate(Right('Q4 2014',4),Mid('Q4 2014',2,1)*3),'DD.MM.YYYY')

View solution in original post

6 Replies
Not applicable
Author

hi

try like this

makedate(1999) returns 1999-01-01

makedate(1999) returns 1999-01-01

makedate(99) returns 0099-01-01

makedate(1992,12) returns 1992-12-01

makedate(1999,2,14) returns 1999-02-14

tresesco
MVP
MVP

=MakeDate(Mid(YourQuarter,4), Mid(YourQuarter,2,1)*3)

Anonymous
Not applicable
Author

you can use (monthstart(quarterend(yourquarteryeardate))

if you have two fields year and quarter  (2 characters) use:

makedate(year, monthstart(right(Quarterstring,1)*3))

Not applicable
Author

Or try

makedate(YearNo,ceil(QtrNo*3)-2)

MK_QSL
MVP
MVP

=Date(MakeDate(Right('Q4 2014',4),Mid('Q4 2014',2,1)*3),'DD.MM.YYYY')

Not applicable
Author

Thank you all!