Convertir java.util.date to string:
objElRes.getCampoFecha()!=null){
Calendar calendar = Calendar.getInstance();
calendar.setTime(objeto.getCampoFecha()); //getCampoFecha es de tipo java.util.date
SimpleDateFormat format1 = new SimpleDateFormat("dd-MM-yyyy");
String formatted = format1.format(calendar.getTime());
objeto.setValor(formatted);
No hay comentarios:
Publicar un comentario