2

When running

select to_char ("dateoftransfer", '"Q"quarter YYYY') as quarterly
FROM table;

I get back Q3uarter 2001 but expect Q3 2001

"dateoftransfer" is data type date

What am i doing wrong?

1 Answer 1

3

I think you are looking for this format:

select to_char(dateoftransfer, '"Q"Q YYYY')
Sign up to request clarification or add additional context in comments.

3 Comments

Thank you! I had no idea you could do that
I'm trying to use this in conjunction withINSERT INTO but this doesn't work, is the syntax wrong?
@mappingdom . . . You should ask another question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.