Java Now nowTime(String format)

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

Description

now Time

License

Open Source License

Declaration

public static String nowTime(String format) 

Method Source Code


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

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static String nowTime(String format) {
        return new SimpleDateFormat(format).format(new Date());
    }/*from www.java  2 s .c o  m*/

    public static String nowTime() {
        return nowTime("yyMMddHHmmss");
    }
}

Related

  1. nowInBasicFormat()
  2. nowStr()
  3. nowString(String pattern)
  4. nowString(String pattern)
  5. nowTime(String formartStr)
  6. printNow()
  7. stringDate(Date now)
  8. subNow()
  9. toStr2(Date now)