Hibernate returning incorrect date value from Sql Server
Posted on 2006-04-19
Hello - I have a Sql Server database that has a column with a field type of "datetime", which is filled with values automatically by hibernate's timestamp. One record is stored with the value "4/19/2006 9:45:00 AM", but when I retrieve the object from hibernate and use a get method, it returns a different datetime (when I format the output, it looks like this: "04/18/2006 06:00:00 AM"). I want to use the Calendar object to check if a date I have is after the value in the database, but I am getting incorrect output because the date is being returned to me wrong.
I'd appreciate your help!