Here you can find the source of getTimeStamp(Date date)
public static String getTimeStamp(Date date)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static String timePattern2 = "yyyyMMddHHmm"; public static String getTimeStamp(Date date) { SimpleDateFormat format = new SimpleDateFormat(timePattern2); return format.format(date); }// www . j av a 2 s .c o m }