trouble with formatting using to_char
extract (quarter FROM reviewedon) AS quarter
returns 4
I need it to display as 'Q4:YYYY'
Here is my script: extract to_char((quarter FROM reviewedon),'"Q"Q:yyyy') AS quarter
this is the error I am getting: ERROR: syntax error at or near "(" LINE 66: extract to_char((quarter FROM reviewedon),'"Q"Q:yyyy') AS qu...
CodePudding user response:
you only need to_char()
to_char(reviewdon, '"Q"q:yyyy')