Java SQL Date Create getSqlCurrentDate()

Here you can find the source of getSqlCurrentDate()

Description

get Sql Current Date

License

Open Source License

Declaration

public static java.sql.Date getSqlCurrentDate() throws ParseException 

Method Source Code


//package com.java2s;

import java.text.ParseException;

import java.text.SimpleDateFormat;

public class Main {

    public static java.sql.Date getSqlCurrentDate() throws ParseException {

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        java.util.Date d = sdf.parse(sdf.format(new java.util.Date()));

        return new java.sql.Date(d.getTime());
    }//from  w w w. j  a va2s .  c  o m
}

Related

  1. getLastDayOfMonth(java.sql.Date date)
  2. getLastDayOfPreviousMonth(Date date, boolean isFormatDate)
  3. getLastSundayDate()
  4. getLongDate(String strDate)
  5. getSqlCurrentDate()
  6. getSqlDate()
  7. getSQLDate()
  8. getSqlDate()
  9. GetSqlDate()