I need to convert the date format to YYYY-MM-DD but when I use this formula TO_DATE(starttime, 'YYYY-MM-DD') in my query, the date in the query output is displayed in this format '17-AUG-16' , '17-AUG-17'.
How do I convert the date to exactly YYYY-MM-DD format ? The output column should be date datatype. And I don't want to use "alter session set nls_date_format" since the query needs to be run via ETL process.
Thanks!
Note: The starttime column in the table contains the data in this format shown below.
