Here you can find the source of getCurrentDate()
public static String getCurrentDate()
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**//from w w w .ja v a 2 s . c om * Return timestamp - that can be used for logging purpose * * @return */ public static String getCurrentDate() { String timestamp = (new SimpleDateFormat("MMddHHmm")).format(new Date()); return timestamp; } }