Forum Stats

  • 3,733,845 Users
  • 2,246,829 Discussions
  • 7,856,892 Comments

Discussions

Forms 11g VS Forms 12c

MarcLaf
MarcLaf Member Posts: 160 Blue Ribbon

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:

Same process (no code change) in Forms 12c:

As 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:

Here'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

Answers

Sign In or Register to comment.