Here you can find the source of DateToStringByformat2(Date date)
public static String DateToStringByformat2(Date date)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static final SimpleDateFormat format2 = new SimpleDateFormat("yyyyMMddHHmmss"); public static String DateToStringByformat2(Date date) { return format2.format(date); }/*from w ww .ja va 2s. c o m*/ }