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!

ORACLE APEX 23 : DIFFERENCE BETWEEN 2 DATES SHOW IN NO OF DAYS

SANPATJun 14 2023

DEAR FRIENDS

We want to display and save the difference between 2 dates

In the Oracle apex form Created a dynamic action → set value → pls/SQL code → the following query, tried all kinds of option such as Oracle expression, pl/SQL code, etc., but still not getting the output in the item.

DECLARE
v_date1 DATE := TO_DATE(:P6_ABSENT_FROM, 'DD-MM-YYYY');
v_date2 DATE := TO_DATE(:P6_ABSENT_TO, 'DD-MM-YYYY');
v_difference NUMBER;
BEGIN
v_difference := v_date2 - v_date1;
:P6_CALCULATE_ABSENT_DAYS := v_difference;
END;

sandy

This post has been answered by user-f42dl on Jun 24 2023
Jump to Answer
Comments
Post Details
Added on Jun 14 2023
6 comments
2,040 views