00936. 00000 - "missing expression" CAST EXPRESSION

261 views Asked by At

I am trying to change a date format on a column labeled ADDED_DATE.

the current results are 30-FEB-17 I wanted to convert to mm/dd/yyyy

I tried using the statement below but it is giving me an error.

CAST(varchar(10), cast  (ADDED_DATE AS date) , 101) ,

ORA-00936: missing expression 00936. 00000 - "missing expression" *Cause:
*Action:

Thank you for your time.

2

There are 2 answers

3
developer_hatch On

Try to do directly this:

to_date(ADDED_DATE,'DD/MM/YYYY');
0
M Hernandez On

needed to add To_char

TO_CHAR(TO_DATE('01-JAN-16','DD-MON-YY'),'MM/DD/YYYY')