DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
java.util.Date date = new java.util.Date();
String datetime = dateFormat.format(date);
System.out.println("Current Date Time : " + datetime);
In case you use ADF business components for your Model project, you get the
current date in a slightly different way. Consider for example the following code snippet,
from an adf business components, employees entity object:
import oracle.jbo.domain.Date; ...
In case you need to convert oracle.jbo.domain.Date to java.util.Date, please consult this:
http://forums.oracle.com/forums/thread.jspa?threadID=2185902&tstart=15
or
http://www.ecotronics.ch/webdesign/javadate.htm
References
More help about: using timestamps
http://download.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html