Java SQL Date Create getCurrentDate()

Here you can find the source of getCurrentDate()

Description

Get current date's string

License

Open Source License

Declaration

public static String getCurrentDate() 

Method Source Code


//package com.java2s;
import java.sql.Date;

import java.text.SimpleDateFormat;

public class Main {
    public final static String DATE_FORMAT_yyyy_MM_dd = "yyyy-MM-dd";

    /**// w  w  w .  jav a 2  s .c  o m
     * Get current date's string
     * @return
     */
    public static String getCurrentDate() {
        return new SimpleDateFormat(DATE_FORMAT_yyyy_MM_dd).format(new Date(System.currentTimeMillis()));
    }
}

Related

  1. getCurrentDate()
  2. getCurrentDate()
  3. getCurrentDate()
  4. getCurrentDate()
  5. getCurrentDate()
  6. getCurrentDateStart()
  7. getCurrentDateStr(String strFormat)
  8. getCurrentDateString()
  9. getCurrentDateWithMinutePrecision()