This discussion is archived
5 Replies Latest reply: Aug 29, 2013 11:48 PM by user8959800 RSS

Get current date (with current time too)

user8959800 Newbie
Currently Being Moderated

Hi.

 

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

 

In my app (Jdeveloper 11.1.1.7.0), 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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points