• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.date

 
Saurabh Dutt
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the differce between java.util.date and java.sql.date???
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.sql.Date - from the JavaDoc:

A thin wrapper around a millisecond value that allows JDBC to identify this as a SQL DATE. A milliseconds value represents the number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.

To conform with the definition of SQL DATE, the millisecond values wrapped by a java.sql.Date instance must be 'normalized' by setting the hours, minutes, seconds, and milliseconds to zero in the particular time zone with which the instance is associated.

So basically, its the date you use in conjunction with JDBC.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic