I am trying to select records from a table where the CREATEDT field is between SYSDATE and 20 days prior.
where to_char(createdt, 'dd/mm/yyyy') between to_char(sysdate, 'dd/mm/yyyy')
and to_char(sysdate - 20, 'dd/mm/yyyy')
There are records in that table that are in the date range but the SQL is not finding them. What am I doing wrong?
August 27, 2012 7:34 PM