Skip to content
Advertisement

Need help converting date in format 20120130 to Date data type oracle sql

Could you please help me in converting date from the format “20120101” to DATE format in Orcle Sql.

I looked at this link but it does not mention if the date format is custom..

EDIT: Is it possible to write any exclusion rule to the conversion function?

something like this “99999999” to “9999-12-31”? Is it possible?

Advertisement

Answer

SELECT to_date('20120101','YYYYMMDD') FROM dual;
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement