Here you can find the source of formatDateTime(java.util.Date paramDate)
public static String formatDateTime(java.util.Date paramDate)
//package com.java2s; import java.text.SimpleDateFormat; public class Main { public static String formatDateTime(java.util.Date paramDate) { if (paramDate == null) return null; SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); localSimpleDateFormat.setLenient(false); return localSimpleDateFormat.format(paramDate); }/* ww w. ja v a 2s .co m*/ }