Java Today getTodayInFormat(String format)

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

Description

getTodayInFormat

License

Apache License

Parameter

Parameter Description
format a parameter

Declaration

public static String getTodayInFormat(String format) 

Method Source Code

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

import java.util.Date;

public class Main {
    /**//ww w .ja v a2 s.  c  o  m
     * getTodayInFormat
     * @param format
     * @return
     */
    public static String getTodayInFormat(String format) {
        Date td = new Date();
        java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat(format);
        String datenewformat = formatter.format(td);
        return datenewformat;
    }
}

Related

  1. getTodayFolder()
  2. getTodayFormat(String format)
  3. getTodayFormatString(String pattern)
  4. getTodayFormatted(String pattern)
  5. getTodayHHmmss(String HHmmss)
  6. getTodayIntevalDays(String date)
  7. getTodayLast()
  8. getTodayLastSecond()
  9. getTodayLastSecond()