I have been running into a weird issue while using SQL DEVELOPER, I have two dates that I would like to get the difference between; however, I have been getting inaccurate results...
I have:
column1 with the date 03-Aug-2016
column2 with the date 08-July-2016
when using to_date function with the following:
to_date(column1, 'dd-mon-yyyy') ==> the date is displayed as 03-Aug-2016
but column2 is different story as it gives the following:
to_date(column2, 'dd-mon-yyyy') ==> the date is displayed as 10-July-2016
but when using to_date(column2, 'dd-mon-RR') ==> the date is displayed as 08-July-2016
and when I use the following in my query I get a weird number
to_date(column1, 'dd-mon-yyyy') - to_date(column2, 'dd-mon-RR') ==> -730463
Your help is really appreciated!
to_dateover it.