Although java.sql.Date extends java.util.Date (which
contains time values) the SQL specification says:

 There are three classes of datetime data types
 defined within this International Standard:

 DATE - contains the <datetime field>s YEAR, MONTH,
 and DAY;

 TIME - contains the <datetime field>s HOUR, MINUTE,
 and SECOND;

 and

 TIMESTAMP - contains the <datetime field>s YEAR,
 MONTH, DAY, HOUR, MINUTE, and SECOND.


And because of that the API docs for java.sql.Date
tell you:

 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 you should consider using java.sql.Timestamp as
column type in your table or a combination of
java.sql.Date and java.sql.Time

Cheers
Torsten



____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to