Sysdate truncating time off
CashyNov 25 2010 — edited Nov 25 2010Hi,
I am having issues with a date field that I have on a form.
The field is hidden and has a default set as sysdate. This gets the date OK but it is truncating the time off.
I have tried using a date picker (DD-MON-RR HH24:MI) , but when I have sysdate set as the default, the time is set to 00:00. If I take the default off, the time is returned OK. The formatting masks are also no use when I have set the default as sysdate.
As it is a hidden field, using a date picker is not very useful anyway.
I have also tried using a text item and setting the default as to_char(sysdate, 'DD-Mon-RR HH24:MI:SS') but as the database column that is being inserted into is of type DATE, that is no use either and to_date(sysdate, 'DD-Mon-RR HH24:MI:SS') still trunactaes the time.
I dont really want to have to start using background triggers to set the time, or use custom functions as this could be problematic in the future to maintain.
I am currently using Apex v2 although we are looking to upgrade to v4 very soon.
Any help would be great,
Thanks