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