Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to Change Date Format from DD MMM, YYYY to DD-MM-YYYY

1051553Jan 28 2014 — edited Jan 29 2014

Hello,

Hope everyone is doing good. I need small help on changing date format for screen_date.

One of my Oracle 11g Table has dates loaded as 14 Nov, 2013 (VARCHAR2). I would like to convert that to DD-MM-YYYY. For some reason my query is not working.

Here is the query that i am using to convert the date format  Case When screen_date <> 0 Then to_date(screen_date, 'DD-MM-YYYY HH24:MI:SS') Else Null End as screen_date

Here is the error I am getting when ever i try to execute above query

ORA-01722: invalid number

01722. 00000 -  "invalid number"

*Cause:   

*Action:

Not sure what else do i need to do to change the date formats.

Any help will be appreciated

Thanks,

Naveen

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 26 2014
Added on Jan 28 2014
6 comments
5,318 views