Here you can find the source of getNowDateTime()
public static String getNowDateTime()
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.util.GregorianCalendar; import java.util.Locale; public class Main { /**/*from ww w .j a va 2s . c o m*/ * Gets the now date time. * * @return the now date time */ public static String getNowDateTime() { GregorianCalendar gcNow = new GregorianCalendar(); java.util.Date dNow = gcNow.getTime(); DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, Locale.SIMPLIFIED_CHINESE); return df.format(dNow); } }