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!

Weird way how Dates are handled in APEX?

libranJun 7 2007 — edited Jun 8 2007
Hi

APEX 2.1.x, 10g XE, Windows XP

I am facing a unique situation, when I am trying to save a date value (with its time component) in APEX. The time portion (hours, minutes and AM/PM) are accepted into separate text variables by the user. My Date column A_Time is a hidden column on the form, whose value is computed via a pl/sql expression, after SUBMIT.

The date part of the A_Time is derived from an already populated another date field on the form.

My PL/SQL computation expression for A_Time is as below

to_date(:P1_EXISTING_DATE||' '||:P1_ARRIVAL_HOUR||':'||:P1_ARRIVAL_MINUTE||:P1_ARRIVAL_AMPM,'DD-MON-YYYY HH:MIPM');

It is storing the date part but completely ignoring the time part (hours,mints am/pm values). Looks like theres trunc happening behind the scenes may be?

Is this a weird way that APEX behaves? I am curious to know if anyone had the similar issue or is it something thats happening at my end?

Thanx
Suma



to_dateTO_CHAR(TO_DATE(:P1_REPORT_DATE||' '||:P1_ARRIVAL_HOUR||':'||:P1_ARRIVAL_MINUTES||:P1_ARRIVAL_AMPM,'DD-MON-YYYY HH:MIPM'),'DD-MON-YYYY HH:MIPM');
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 6 2007
Added on Jun 7 2007
4 comments
572 views