Calendar calendar = new GregorianCalendar();
if (eventDetails.getStartdate() != null)
{
Timestamp date = (Timestamp)eventDetails.getStartdate();
calendar.setTimeInMillis(date.getTime());
int[] hhmm = new int[2];
hhmm[0] = calendar.get(Calendar.HOUR_OF_DAY);
hhmm[1] = calendar.get(Calendar.MINUTE);
String strTime = CVUtility.convertTime24HrsFormatToStr(hhmm);
dynaForm.set("startmonth", Integer.toString(calendar.get(Calendar.MONTH) + 1));
dynaForm.set("startday", Integer.toString(calendar.get(Calendar.DATE)));
dynaForm.set("startyear", Integer.toString(calendar.get(Calendar.YEAR)));
dynaForm.set("starttime", strTime);
}
if (eventDetails.getEnddate() != null)
{
Timestamp date = (Timestamp)eventDetails.getEnddate();
calendar.setTimeInMillis(date.getTime());
int[] hhmm = new int[2];
hhmm[0] = calendar.get(Calendar.HOUR_OF_DAY);
hhmm[1] = calendar.get(Calendar.MINUTE);
String strTime = CVUtility.convertTime24HrsFormatToStr(hhmm);
dynaForm.set("endmonth", Integer.toString(calendar.get(Calendar.MONTH) + 1));
dynaForm.set("endday", Integer.toString(calendar.get(Calendar.DATE)));
dynaForm.set("endyear", Integer.toString(calendar.get(Calendar.YEAR)));
dynaForm.set("endtime", strTime);
}
if (eventDetails.getCreateddate() != null)
{
Timestamp date = (Timestamp)eventDetails.getCreateddate();
calendar.setTimeInMillis(date.getTime());
String month = getCalenderMonth(calendar.get(Calendar.MONTH) + 1);
dynaForm.set("createddate", month + " " + Integer.toString(calendar.get(Calendar.DATE)) + ", " + Integer.toString(calendar.get(Calendar.YEAR)));
}
if (eventDetails.getModifieddate() != null)
{
Timestamp date = (Timestamp)eventDetails.getModifieddate();
calendar.setTimeInMillis(date.getTime());
String month = getCalenderMonth(calendar.get(Calendar.MONTH) + 1);
dynaForm.set("modifieddate", month + " " + Integer.toString(calendar.get(Calendar.DATE)) + ", " + Integer.toString(calendar.get(Calendar.YEAR)));
}