
04/03/2008, 11:05
|
| | Fecha de Ingreso: febrero-2008
Mensajes: 23
Antigüedad: 17 años Puntos: 0 | |
Re: como sumar fecha con simpleDateFormat? Muchas gracias por su respuesta, aqui esta el codigo completo funcionando por si alguien mas tuviera la misma duda:
<%
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
int calendarTime = Calendar.DAY_OF_MONTH;
int temp = calendar.get(calendarTime);
calendar.set(calendarTime, temp+7);
SimpleDateFormat formatoFecha = new SimpleDateFormat();
formatoFecha.setTimeZone(TimeZone.getTimeZone("GMT-6"));
Date fechaSum = calendar.getTime();
formatoFecha.applyPattern("dd/MM/yyyy");
String fechaRespuesta = formatoFecha.format(fechaSum);
%>
Feliz dia!! |