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!

update date format dd-mon-yy to MM/DD/YYYY

913349Jun 3 2015 — edited Jun 4 2015

Hi all,

i am using oracle 11g

i have a below table  test with data

TEST

id  number, created_date data type is  date

id   created_date
1      03/21/2015
2       01-JUL-15

3       02-AUG-15

.................
........................

I  want to update  the record whose values are  like DD-MON-YY  to  MM/DD/YYYY

I have below query which is giving me error , not a valid month

update test set created_date=to_char(to_date(created_date,'DD-MON-YY'),

'MM/DD/YYYY') where length(created_date)=9;

Regards

Damby

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 2 2015
Added on Jun 3 2015
10 comments
5,965 views