2017  Kodetalk | Feedback | Privacy Policy | Terms | About

convert a string to a date in Oracle database

In my table i have a column which holding dates but the column datatype is varchar2.

Now i need to use this column in comparing with other date columns. 

I am not able to compare string and date columns please let me know how can i convert the string to date.


We can convert the string column to a date by using to_date function.

It will take user defined date and its format and convert it to system date format.

Ex:    to_date ('2016-01-01', 'YYYY/MM/DD')  

In comparison use column name in place of date in above.


Answer is