Here you can find the source of formatDateTime(java.sql.Timestamp ts)
public static String formatDateTime(java.sql.Timestamp ts)
//package com.java2s; public class Main { public static String formatDateTime(java.sql.Timestamp ts) { String temp = String.valueOf(ts); if (temp != null && temp != "" && temp != "null") temp = temp.substring(0, 16); else if (temp == "null") temp = ""; return temp; }//from w w w . java 2 s . com }