I'm creating a report for one table. And if the field is null, it should show blank in the report. I have endtime field of type timestamp and if its null, its gotta show blank in the report. The problem is its showing null in the report instead of blank. ANy hlep would be greatly appreciated. Thanks. Here's the code
java.sql.Timestamp endtime = rs.getTimestamp("endtime");
if(rs.wasNull())
{
endtime =null;
}
and the below code generates HTML session for this row
out.println(" <TD width=150 nowrap>");
if(endtime == null)
out.println(" " + endtime);
else
out.println(" " + (new SimpleDateFormat("EEE' 'MM/dd/yyyy' 'HH:mm:ss")).format((java.util.Date) endtime, new StringBuffer(), new FieldPosition(DateFormat.YEAR_FIELD)).toString());