I need to parse out the year and quarter from the Date column. My data looks like this:
Date
Feb 1, 2019 Feb 2, 2019
Desired output is:
2019, 1 2019, 1
I have tried:
QUARTER(`Date`)
But this only gives me back the quarter 1. Can't find a way to include both year and the quarter. Thank you!
1
You can use CONCAT to show both year and quarter
CONCAT
SELECT CONCAT(YEAR("2017-06-15"), ", ", QUARTER("2017-06-15"));
2.1m questions
2.1m answers
60 comments
57.0k users