Here you can find the source of getDBCurrentTime()
public static String getDBCurrentTime() throws java.text.ParseException
//package com.java2s; import java.util.*; import java.text.*; public class Main { /**/*w w w . jav a 2s . co m*/ * Returns current date/time in ORACLE format * * @return current date * * @exception ParseException if format fails */ public static String getDBCurrentTime() throws java.text.ParseException { String dbFormat = "yyyy-MM-dd HH:mm:ss"; SimpleDateFormat sdf = new SimpleDateFormat(dbFormat); return (sdf.format(new Date())); } }