I am trying to list the dates registered in a table with SQL Server, but my problem is that all the dates I retrieve are different than 2 days with dates in the table.
For example, I got 2012-12-25 in my database, and when I retrieve it and drop it in Java.util.Date, it becomes 2012-12-23 ...
I have processes in dates in another table that are working fine.
I am using SQL Server 2008, Hibernate 3, and Spring 3.
Edit:
The column data type for the table is the date, I get it using hibernate, so here my hibernation request is called:
public List<Holiday> retrieveAllHolidays() { return (List<Holiday>) sessionFactory.getCurrentSession().createQuery("from Holiday") .list(); }
The holiday object received two attributes: String and Date (this is incorrect after retrieving from the database).
source share