1

I need to convert date format in ORACLE.The current value is 0080-08-24 and i want to convert it into 1980-08-24 How to update above value?

2 Answers 2

2

Try this:

update tablename
set datecolumn= add_months(date'0080-08-24',1900*12) 
Sign up to request clarification or add additional context in comments.

Comments

1

Just for completeness, another solution:

SELECT TO_DATE('0080-08-24','"00"RR-MM-DD') FROM DUAL;

24-AUG-1980

2 Comments

The output of above query is : 24-AUG-80
Yep - your NLS date format uses 2-digit years. If you fix your format you will see 1980.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.