Here you can find the source of getCurrentDateTimeForShow()
public static String getCurrentDateTimeForShow()
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static SimpleDateFormat showDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public static String getCurrentDateTimeForShow() { return showDateFormat.format(new Date()); }/*from w w w . j ava 2 s. c o m*/ }