5 Replies Latest reply on Aug 30, 2013 6:48 AM by user8959800

    Get current date (with current time too)




      I have read some blogs and threads about this, but I don't know the solution.


      In my app (Jdeveloper, I have an Entity with a Date field.

      I need that field to take the current date and hour (29/08/2013 15:54:42)


      I use a Groovy expression in the Entity Object, Edit Attribute dialog, to assign the expression value adf.currentDateTime

      The execution runs ok, but checking the field value in the database ( with TO_CHAR(related_date, 'DD/MM/YYYY HH24:MI:SS') ), the result is 29/08/2013 00:00:00


      So, how can I also insert the current hour with seconds? Is there any other way to make this (insert the current instant, with second precission)?


      Thanks in advance.



      EDIT: Changing field type from DATE to TIMESTAMP works.

      It must be changed in EO in JDeveloper and in DB too.

      Thank you all