Java SQL Date Create getCurrentDate()

Here you can find the source of getCurrentDate()

Description

get Current Date

License

Apache License

Declaration

public static java.sql.Date getCurrentDate() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;
import java.util.*;

public class Main {

    public static java.sql.Date getCurrentDate() {
        return new java.sql.Date(new Date().getTime());
    }// w w  w .j  a  v  a 2  s  . co m

    public static String getTime() {
        Date currentTime = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String dateString = formatter.format(currentTime);
        String min;
        min = dateString.substring(14, 16);
        return min;
    }
}

Related

  1. createUpdateStatement(Connection conn, String databaseName, String[] fieldsToUpdate, String[] selectionFields)
  2. currentDate()
  3. currentDate()
  4. currentDate()
  5. getCurrDate()
  6. getCurrentDate()
  7. getCurrentDate()
  8. getCurrentDate()
  9. getCurrentDate()