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!

Date in the future ?

Christian PitetFeb 27 2020 — edited Feb 28 2020

Hi

I have a string which is representing a date. This is an example : '27/02/2020 15 00'. It is in a format 'DD/MM/YYYY HH24 MI'. I would like to know if this date is in the future. Something returning true is the date is in the future. I don't know how to do the comparison with SYSDATE.

I have tried this :

select TO_DATE (:P46_DATE_DEBUT, 'DD/MM/YYYY') >= SYSDATE from dual

but it returns an error : FROM keyword not found where expected.

The solution you may offer could be an PL/SQL Expression or a function returning a boolean. I am under Oracle DB 12.1.

Thank you.

This post has been answered by Cookiemonster76 on Feb 28 2020
Jump to Answer
Comments
Post Details
Added on Feb 27 2020
9 comments
2,366 views