Re: Date conversion problem ??

2001-10-10 Thread Nick Newman
Hi Eddie, The code that Fredrick Lindgren sent to this list looks like the right way of obtaining a java.util.Date from a java.sql.Timestamp. As for your question of why, part of the answer may be that three java classes are somewhat confusing: - java.util.Date (not used by JDBC) contains

Re: Date conversion problem ??

2001-10-08 Thread Eddie
conversion problem ?? You are right that is not the JDBC driver that makes this happen. It is JDBC itself. java.sql.Timestamp is a subclass of java.util.Date but it returns the integral seconds when calling getTime(). It supports nano second precision with the getNanos() method. The javadoc

Re: Date conversion problem ??

2001-10-08 Thread Oisin Kim
, the millisecond part is zero. Does this mean that is only zero when the date field is handled by the JDBC part ?? Eddie - Original Message - From: Fredrik Lindgren [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Friday, October 05, 2001 6:50 PM Subject: Re: Date conversion

Re: Date conversion problem ??

2001-10-08 Thread Fredrik Lindgren
] Sent: Friday, October 05, 2001 6:50 PM Subject: Re: Date conversion problem ?? You are right that is not the JDBC driver that makes this happen. It is JDBC itself. java.sql.Timestamp is a subclass of java.util.Date but it returns the integral seconds when calling getTime(). It supports nano

RE: Date conversion problem ??

2001-10-05 Thread Shields James
implementation inheritance, and not type inheritance. -Original Message- From: Sarathy Mattaparti [mailto:[EMAIL PROTECTED]] Sent: 05 October 2001 06:33 To: Orion-Interest Subject: Re: Date conversion problem ?? use java.util.Timestamp instead of Date that will solve your problem

Re: Date conversion problem ??

2001-10-05 Thread Fredrik Lindgren
You are right that is not the JDBC driver that makes this happen. It is JDBC itself. java.sql.Timestamp is a subclass of java.util.Date but it returns the integral seconds when calling getTime(). It supports nano second precision with the getNanos() method. The javadoc includes this note:

Date conversion problem ??

2001-10-04 Thread Ed Bras
Hellu, I retrieve a datetime field from the Ms SQL server. With a win sql client I see: 2001-10-03 19:33:10.257 When I print the field in an EJB (I use CMP) the millisecond part is zero !!!: Wed Oct 03 19:33:10 GMT+02:00 2001 In milliseconds: 100213039 I had the same problem with the

Re: Date conversion problem ??

2001-10-04 Thread Sarathy Mattaparti
use java.util.Timestamp instead of Date that will solve your problem. Sarathy Hellu, I retrieve a datetime field from the Ms SQL server. With a win sql client I see: 2001-10-03 19:33:10.257 When I print the field in an EJB (I use CMP) the millisecond part is zero !!!: Wed Oct 03 19:33:10