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!

DATE not picking up time portion from SYSDATE

garywickeJun 24 2008 — edited Sep 15 2008
Environment:

APEX 2.2
Oracle EE 10.2.0.2

I feel I'm missing something very basic but I've stared at it so long all I see are the trees :-(

I have a hidden item mapped to my database column that is defined as a DATE type. I have a text item that the user enters a time into in the format HHMIAM (I couldn't get them to user a 24-hour clock).

I have a computation (After Submit) on my database column in which I would like to merge today's date (MMDDRRRR part) with the time entry (HHMIAM) from the user and store the resultant date and time in the database.

My computation is defined as a SQL Expression and looks like this: TO_DATE( TO_CHAR( sysdate, 'RRRRMMDD') || :P1_START_TIME, 'RRRRMMDDHHMIAM').

The application runs with no apparent errors but when I look at the data in the table I get the correct date but no time portion (it shows as 00:00:00).

I even changed the computation to ignore my entry item and just use SYSDATE like this: TO_DATE( TO_CHAR( sysdate, 'RRRRMMDDHHMIAM'), 'RRRRMMDDHHMIAM') but I still only get the date portion in the table.

I know I've said this many times before in other circumstances but 'Where has the time gone?' (Gotta keep the sense of humor!).

I've checked the session variables and the entry item shows good time data in the correct format and the database item shows just the date but I'm sure that's just a formatting issue with the 'Session' display. It does show at least the date portion is getting set.

Any ideas are GREATLY appreciated. Thanks!

-gary
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2008
Added on Jun 24 2008
11 comments
2,124 views