Wednesday, November 5, 2014

How to convert sql date to util date


private String convertSqlDateToUtilDate(java.sql.Timestamp sqlDate) {

SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");

Calendar utilDate = Calendar.getInstance();

utilDate.setTimeInMillis(sqlDate.getTime());

return sdf.format(utilDate.getTime());

}

LinkWithin

Related Posts Plugin for WordPress, Blogger...