• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to set Date data type into varible  RSS feed

 
feng fu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I sign the data type 'Date' from the database into a varible?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66261
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Harldy a JSP question, is it? Moving to the JDBC forum.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37395
531
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Feng,
The resultset object has getDate() and getTimestamp() methods. These will let you get your date in the database into a java.util.Date or java.sql.Timestamp object.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!