Skip to Main Content

APEX

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!

How to get Date picker value to match with date field?

Punk WDec 5 2024

I have a dynamic action based on button click. In the action I have a pl/sql code where it takes in the date picker value. It would look something like this:

DECLARE
v_count NUMBER;
BEGIN
SELECT COUNT(*)
INTO v_count
FROM tableA
WHERE datecol = TO_DATE(:P2_DATE, ‘MM-DD-YYYY’);

RETURN v_count > 0;
END;

It’s not triggering correctly. I tried hard coding it like this and it triggers correctly:

Datecol = TO_DATE('10/15/2024', 'MM-DD-YYYY')

So I have isolated the issue to be the date picker value that is passed into P2_DATE. It apparently is not matching with datecol which shows format of MM/DD/YYYY in the table. Not sure how to get it to work.

Comments
Post Details
Added on Dec 5 2024
5 comments
221 views