2

I am slightly confused with the way to_char works in oracle. How would you translate this sql server line into oracle?

cast(month(date) as varchar)+'/'+cast(day(date) as varchar)+'/'+cast(year(date) as varchar)
2
  • 1
    Your title says translate from oracle to sql server and your question says translate from sql server to oracle. Which is it? Commented May 10, 2016 at 12:40
  • Yes! So sorry. Just corrected it, thanks Commented May 10, 2016 at 12:53

1 Answer 1

6

Just use this:

select to_char(date_column,'MM/dd/yyyy') from your_table;

You should read more about to_char in oracle docs or techonthenet. You will find it easy to understand.

Sign up to request clarification or add additional context in comments.

1 Comment

Hum I had been messing up on something quite silly. Thank you

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.