stat.setString(1, DateConverter.getFormattedDate(from, "yyyy-MM-dd 00:00:00.000"));
stat.setString(2, DateConverter.getFormattedDate(to, "yyyy-MM-dd 23:59:59.999"));
res = stat.executeQuery();
Calendar calendar = Calendar.getInstance();
while (res.next()) {
DateStatistic statistic = new DateStatistic();
int hit = res.getInt(1);
calendar.set(res.getInt(2), res.getInt(3)-1, res.getInt(4), 0, 0, 0);
Date day = calendar.getTime();
statistic.setDate(day);
statistic.setVisits(new Integer(hit));
visitsStats.add(statistic);
}
} catch (Throwable t) {
processDaoException(t, "Error searching visits for date", "searchVisitsForDate");
} finally {