Java Date Now getNowDate(String format)

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

Description

get Now Date

License

Apache License

Declaration

public static final String getNowDate(String format) 

Method Source Code


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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static final String getNowDate(String format) {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        Date date = new Date();
        return sdf.format(date);
    }// w  w w.j  av a  2 s .c om
}

Related

  1. getNowDate()
  2. getNowDate()
  3. getNowDate()
  4. getNowDate()
  5. getNowDate(String format)
  6. getNowDateShort()
  7. getNowDateStr(String formatStr)
  8. getNowDateString(String sign)