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 10g, can't get time with sysdate

cmcantieOct 5 2009 — edited Oct 6 2009
I have a item on a form, start_time, that has the data type of date. The format mask is set to mm/dd/yyyy hh24:mi.
I'm trying to get the date/time defaulted into the field with a when-new-record-instance trigger.
Here's the code:
start_time := sysdate;

but what goes in the field at runtime is just the date with midnight as the time, it looks like this:
10/05/2009 00:00

When I go to sqlplus and type: select sysdate from dual; I get only the date: 10/05/2009
If I type select to_char(sysdate,'mm/dd/yyyy hh24:mi') from dual; I get: 10/05/2009 15:30.
If in my form I set start_time := to_char(sysdate,'mm/dd/yyyy hh24:mi'). I get an invalid date error.

How do I get the date and time to default into the field on the form?
This post has been answered by CraigB on Oct 5 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2009
Added on Oct 5 2009
2 comments
2,685 views