'How to convert numeric string to date in SQL

How to convert '2015030200' to 02-MAR-15

I tried this

SELECT TO_DATE('2015030200', 'YYYYMMDD') FROM dual;

But it didn't work. Can anyone help me.

Thank you

sql


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source