Here you can find the source of getNowDate()
public static String getNowDate()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static final String NORMAL_PATTERN = "yyyy-MM-dd HH:mm:ss"; public static String getNowDate() { SimpleDateFormat formatter = new SimpleDateFormat(NORMAL_PATTERN); Date curDate = new Date(System.currentTimeMillis()); String str = formatter.format(curDate); return str; }/*from w w w . j a v a2 s .co m*/ }