Java Date Now getCurrentDate(String format)

Here you can find the source of getCurrentDate(String format)

Description

get Current Date

License

Open Source License

Declaration

public static String getCurrentDate(String format) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.Locale;

public class Main {

    public static String getCurrentDate(String format) {
        SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.SIMPLIFIED_CHINESE);
        Date date = new Date();
        String currentDate = sdf.format(date);
        return currentDate;
    }/* w w w.  ja v a2 s .  co m*/
}

Related

  1. getCurrentDate(Date date)
  2. getCurrentDate(final String form)
  3. getCurrentDate(final String FORMAT)
  4. getCurrentDate(String format)
  5. getCurrentDate(String format)
  6. getCurrentDate(String format)
  7. getCurrentDate(String format)
  8. getCurrentDate(String format)
  9. getCurrentDate(String format)