I have a native query that returns a date field (select ... EVENT_DATE ... from ...).
The Sql Mapping: @SqlResultSetMapping(name = "resultSet", columns = { @ColumnResult(name = "STATUS_CD"), @ColumnResult(name = "DESCRIPTION"), @ColumnResult(name = "EVENT_DATE"), @ColumnResult(name = "LOCATION") })
I use: private static final SimpleDateFormat eventDateFormat = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
eventDateFormat.format(_events[2]);
The time portion is always 0. (12:00 AM).
How can I retrieve the time portion from the DB ? I want to get it in Date format, not convert it in the SQL. Is this possible ?
Thanks, Craig.
|