Hi,
I want to save a record along with current date and time using hibernateDAO.
I am using oracle database. What is the datatype I need to use and also do i need to convert the java date into the oracle date format?
Thanks Charan,
I tried using the <property> as java.sql.timestamp. It is saving the current date. But the time is always being saved as 12:00:00 AM 000
1. How are you constructing the date object (before passing to Hibernate) ?
2. Can you please print the date before passing to hibernate and see if the time is 12:00 am there as well?
Hi Annesh,
Thankyou. I solved the problem.
I was parsing the date to MM/dd/yyyy HH:mm:ss using simpledateformat.
Now I changed it as
SimpleDateFormat sdf = new SimpleDateFormat();