Hi,
If I retrieve 2 date values into page items from a database, are the page item bind variables in the date format?
I ask because I need to do this:
IF trunc(TO_DATE(:P5_NEXT_RENEWAL_DATE,'DD-MON-YYYY')) < trunc(:P5_AS_OF_DT)
But very often I get an error unless I remove the trunc() from around the (:P5_AS_OF_DT) expression.
Both page items are text fields, and are bound to database columns which are of a DATE format.
I am concerned I am actually doing a text comparison and not a date comparison when I see trunc not working around one of the dates.
Do I always have to convert my page items to dates using TO_DATE in every PL/SQL expression I write involving dates in APEX 5.0? Seems odd that I cant just treat a date as a date, when Oracle must know it came from a date field?
I have lots of dynamic actions which have conditions like this:
:P5_RENEWAL_REQUIRED = 'Yes' AND :P5_NEXT_RENEWAL_DATE > :P5_AS_OF_DT
My concern is I am doing a text comparison and not a date comparison.
Regards
SM