Skip to content
Advertisement

How to convert int year to date and display it as century SQL Oracle?

how can I convert int like ‘1984’ to date and display it as century SQL Oracle?

Advertisement

Answer

If the column is a date/time or timestamp:

select to_char(columnname, 'CC') as century from tablename;
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement