Skip to Main Content

Oracle Forms

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!

Forms 11g VS Forms 12c

MarcLafJun 4 2021

Hi,
I have an application which requires a user to pick a date and time from a popup. Then the date and time is copied a GLOBAL var. Once the popup is closed, the GLOBAL var is copied to a field (defined DateTime). This is a very simple process... This processed worked FINE in Forms 11g. Now I compiled the form in Froms 12c, WITH NO CODE CHANGE, but the value in the field (DateTime) is not the same one selected with the Date/Time picker.
Did something changed in Forms 12c causing my copy to DateTime field to cause problems??
Here's pictures and code:
In Forms 11g, everything works fine:
image.pngimage.pngSame process (no code change) in Forms 12c:
image.pngimage.pngAs you can see, the datetime copied to the Dispatch Date field is not the same as the one selected in the Date/Time picker.
Here's the code behind the 'OK' button:
image.pngHere's the code behind the button for the Date/Time picker:
<CODE>
pl_id := get_parameter_list(pl_name);
if not id_null(pl_id) then
destroy_parameter_list(pl_id);
end if;
pl_id := create_parameter_list(pl_name);

add_parameter(pl_id, 'p_window_title', text_parameter, window_title);
add_parameter(pl_id, 'p_pb_ok_label', text_parameter, ok_label);
add_parameter(pl_id, 'p_pb_cancel_label', text_parameter, cancel_label);
IF :v_shp_wsbl.dispatch_date is NULL
THEN
add_parameter(pl_id, 'p_initial_date', text_parameter, disp_datetime); --nvl(:v_shp_wsbl.dispatch_date, sysdate)
ELSE
add_parameter(pl_id, 'p_initial_date', text_parameter, :v_shp_wsbl.dispatch_date);
END IF;

DATE_LOV.CURRENT_LOV_DATE := NULL;
call_form('NMDS045F', no_hide, no_replace, query_only, share_library_data, pl_id);
--
message('Curr Time: '||:GLOBAL.CURR_TIME);

-- select to_char(DATE_LOV.CURRENT_LOV_DATE, 'DD-MON-RR')||' '||:GLOBAL.CURR_TIME
-- into disp_datetime
-- from dual;

disp_datetime := to_char(DATE_LOV.CURRENT_LOV_DATE, 'DD-MON-RR')||' '||:GLOBAL.CURR_TIME;

-- insert into nmds.testing_log
-- (test_date, local_timestamp)
-- values
-- (sysdate, to_date(disp_datetime, 'DD-MON-RR HH24:MI:SS'));

--commit;

message('Disp DateTime: '||disp_datetime);

if date_lov.current_lov_date is not null and
( :v_shp_wsbl.dispatch_date <> DATE_LOV.CURRENT_LOV_DATE or
:v_shp_wsbl.dispatch_date is null )
then
--:v_shp_wsbl.dispatch_date := to_date(disp_datetime, 'DD-MON-YYYY HH:MI:SS');
:v_shp_wsbl.dispatch_date := to_date(disp_datetime, 'DD-MON-RR HH24:MI:SS');
end if;
</CODE>

Please help...

Thanks in advance!
Marc L

Comments
Post Details
Added on Jun 4 2021
8 comments
442 views