jgozal jgozal - 8 months ago 14
SQL Question

Translating line from sql server to oracle

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)


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. It's not to hard to understand.