Java Time Now getDBCurrentTime()

Here you can find the source of getDBCurrentTime()

Description

Returns current date/time in ORACLE format

License

Open Source License

Return

current date

Declaration

public static String getDBCurrentTime() throws java.text.ParseException 

Method Source Code


//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()));
    }
}

Related

  1. getCurrSysTime()
  2. getCurrTime()
  3. getCurrTime()
  4. getCurTime()
  5. getCurTimeStr()
  6. getLogCurrentTime()
  7. getNow()
  8. getNow()
  9. getNow()