-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How to store Date with Timestamp in Oracle
PostPosted: Mon Jun 04, 2007 2:59 am 
Newbie

Joined: Mon Jun 04, 2007 2:51 am
Posts: 1
I have a POJO generated by hbm2java in which I have a property Date.

I need to insert date with timestamp in Oracle using the setter method.

I tried the following ways:

obj.setPwdChangeDt( new java.util.Date() ) and

obj.setPwdChangeDt( new Timestamp( System.currentTimeMillis() ));

But neither is working, only inserting Date.
How to insert date with timestamp.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 3:45 am 
Newbie

Joined: Fri Jun 01, 2007 6:10 am
Posts: 5
Try java.util.Calendar and Retieve time using its methods.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.