I am new to Oracle database. I am not very good at date and time concepts in Oracle. The problem I am facing is retrieving the entries that are entered on a specific date. But when I execute the SQL query in the database, it returns null records.
The database has a date field that contains records with both date and time values.
SQL query: SELECT * FROM table WHERE table.daterecord = to_date(03-Mar-2010)
It does not return any records, but if I change my request to
SELECT * FROM table WHERE table.daterecord > to_date(04-Mar-2010)
It will return some records. The above difference is related to time. How can I extract the time value from a date. Can i use trunc function for this? Thanks in advance for your valuable suggestions.
Infotechie
source share