Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

BETWEEN to_date('20210101', 'YYYYMMDD') and sysdate -1

Hello Experts,
If I run my sql queries (extracts) with below condition at 08:00:00 on April 1, 2021:

BETWEEN to_date('20210101', 'YYYYMMDD') and sysdate -1

The condition will be false for values on March 31, 2021 that are later than 08:00:00 (upper boundary sysdate -1 will be till March 31, 2021 -08:00:00 AM and not after that)?
If yes then how can I modify the query to ensure that it fetches all records till date March 31, 2021 , regard less of time stamp.

Thanks,
Rajneesh

This post has been answered by Frank Kulash on Apr 1 2021
Jump to Answer
Comments
Post Details
Added on Mar 31 2021
13 comments
3,696 views