Here you can find the source of nowTime(String format)
public static String nowTime(String format)
//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"); } }