Here you can find the source of convertTimestampToStringWithoutTime(final Timestamp ts)
public static String convertTimestampToStringWithoutTime(final Timestamp ts)
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; import java.util.Calendar; public class Main { public static String convertTimestampToStringWithoutTime(final Timestamp ts) { final Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(ts.getTime()); return cal.get(Calendar.YEAR) + "-" + cal.get(Calendar.MONTH) + "-" + cal.get(Calendar.DAY_OF_MONTH); }//from w w w. ja v a2 s . c o m }