Here you can find the source of sqlDateConvertoStr(Timestamp date)
public static String sqlDateConvertoStr(Timestamp date)
//package com.java2s; import java.sql.Timestamp; import java.text.SimpleDateFormat; public class Main { public static String sqlDateConvertoStr(Timestamp date) { if (date == null) return null; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return sdf.format(date); }/*w w w . ja v a 2 s . c o m*/ }