public static String formatTimestamp(Timestamp timestamp,String format){
  if (null != timestamp) {
    SimpleDateFormat sdf=new SimpleDateFormat(format);
    return sdf.format(timestamp);
  }
 else {
    return "";
  }
}

public static String formatTimestamp ( Timestamp timestamp , String format ) { if ( null != timestamp ) { SimpleDateFormat sdf = new SimpleDateFormat ( format ) ; return sdf . format ( timestamp ) ; } else { return "" ; } }
formats the given timestamp object in the format hh : mm
