The following query:
select cdate from rprt where cdate <= TO_CHAR(sysdate, 'YYYY/MM/DD-HH24-MI-SS-SSSSS') and ryg='R' and cnum='C002';
return: 2013/04/27-10:06:26:794
as stored in the table.
I want to get the date only as : 27-04-2013
and get the number of days between the resul tdate and sysdate.