Friday, May 21, 2010

convertDateToString

/**
* Convert Date to String
* @param date
* @return
*/
public static String convertDateToString(Date date) {
String rtnString = "";
SimpleDateFormat sdf1 = new SimpleDateFormat("dd-MM-yyyy");
//java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(DateUtils.DATE_FORMAT);
if (date != null) {
rtnString = sdf1.format(date);
}
return rtnString;
}

No comments:

Post a Comment