File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URGENT!!! Date class in java.sql and java.util packages

 
amit sanghai
Ranch Hand
Posts: 231
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi everybody,

This is urgent!!! Why is there a Date class in java.sql package which extends Date class in java.util package?
Thanks in advance to anybody answers this question.
 
bill bozeman
Ranch Hand
Posts: 1070
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When in doubt go to the API and look up the Date class. Here is what the API says:

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.

Bill
 
amit sanghai
Ranch Hand
Posts: 231
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks Bill,
But I cannot understand these statements in API. Please Help!!!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic