Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
niha
Creator II
Creator II

Extracting Quarter Field from numeric date format

Hello,

I have a date format like 201901, 201902, 201903....201801,201802....so on.  I wanted Year, Month ans Quarter Field. I was able to extract Year and Month field. But how to do for Quarter? How to do that. Please suggest.

This gave me Year and Month Field 

left( "Year Month",4) as Year,
Right( "Year Month",2) as Month,

Year-month                    Year                     Month                      Quarter

201901                            2019                    01

201902                            2019                   02

201903                             2019                 03 

201801                             2018                01

201803                             2018               03

201807                            2018               07

 

Please suggest!

Regards,

Niha

1 Solution

Accepted Solutions
niha
Creator II
Creator II
Author

2 Replies
sunny_talwar

Try this

'Q' & Ceil(Num(Right( "Year Month", 2))/3) as Quarter
niha
Creator II
Creator II
Author

Awesome Sunny!