• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inserting the datetime into oracle through hibernate

 
amar sivas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have timestamp column in oracle.So have to insert the datetime value into db with help of @temporal(temporaltype.timestamp) and @dateformat in hibernate entity.

Here problem is oracle is in the format of 12 hours format.But i need to insert the 24 hours format.

How can i insert the data with help @temporal(temporaltype.timestamp) and @dateformat.

can any body give me sugisions on this one

Thanks
Amar
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34669
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amar,
I'm not aware Oracle has a 12 hour based time. Isn't that just for display? That means you would get the right Date back into Java and use SimpleDateFormat to display in the desired format.
 
amar sivas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Amar,
I'm not aware Oracle has a 12 hour based time. Isn't that just for display? That means you would get the right Date back into Java and use SimpleDateFormat to display in the desired format.



Hi Jeanne,thanks for reply.

i have asked about the insertion of the date into oracle,while i am inserting i am change date format with simpleformat.

But the date is inserted in the oracle 12 hours format.

So i think what ever format it is, the oracle might have converted into default format.

So i could not inserted the date with out own format into oracle.

please tell me am i correct or wrong.

Thanks,
Amar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic