This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to insert a date and time in SQLServer 2005 using java

 
am rome
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,


i want to insert a date and time in sql server

am using jpa for connection

when am setting the data in my bean [ ilogmaster.setsatuschddate(new Date());]

but in database it saving the only the date not time

how can i insert date and time in the sql server 2005,

in the database field is datetime

please look the attachment


Thanks
venkat
sqldate.JPG
sqlserver database
[Thumbnail for sqldate.JPG]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33696
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are using @Temporal to identify which type of date and/or time you want stored?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic