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!

Dynamic action to calculate datetime difference error

blyzzMar 14 2017 — edited Mar 16 2017

I am trying to get the difference between 2 date time field into 3rd field in apex form.

the date time fields are defined as date format in the table with the format 'mm/dd/yyyy hh24:mi'  and the result field is number.

I created a dynamic action  and executing a pl sql code where page items to submit are my 2 date fields and page item to return is  the field 3

my code is

SELECT to_char(:ITEM_1, 'mm'dd'yyyy hh24:mi') - to_Char(:ITEM_2,'mm/dd/yyyy hh24:mi')*24*60  INTO :ITEM_3 from tbl A as I read that apex treats all page item as varchar2 but I am getting an error

"AJAX call returned server error ORA-01722: invalid number for Execute Pl/SQL code"

What am I doing wrong?

Thanks,

Blyzz

This post has been answered by Sven W. on Mar 16 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2017
Added on Mar 14 2017
10 comments
806 views