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?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!