Store Date Time with Oracle Apex

Bishan picture Bishan · Jun 15, 2012 · Viewed 11k times · Source

There is a hidden field as last_updated_date in my Oracle Apex application form. I have set SYSDATE as default value of that field. After adding data, I'v checked database table and data in last_updated_date column is show as 15-JUN-12 00:00:00. Time is not saved.

How could I save both date and time?

Answer

Tony Andrews picture Tony Andrews · Jun 15, 2012

In the hidden item's properties set:

  • Source Format Mask to DD-MON-YYYY HH24:MI:SS
  • Default Value to TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS')
  • Default Value Type to PL/SQL Expression