Title: RE: Date problem
Well..It depends what getXXX() method is called. JDBC does provide getDate(), getTime() and getTimestamp() methods to retrieve date information from the database as instances of java.sql.Date, java.sql.Time and java.sql.Timestamp respectively. And then one can convert it to java.util.Date by applying getTime() method on the specific java.sql Date object.
 
Thanks
 
Zahid.
 
 
----- Original Message -----
Sent: Wednesday, September 26, 2001 11:20 AM
Subject: Re: Date problem

Hi Manish.
When you read date from the DataBase using proper driver for java, it will return you an instance of TimeStamp. Use this object to extract the Date. TimeStamp Class is defined in java.sql package.

Cheers,
Sourabh


-----Original Message-----
From: Manish Syal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 26, 2001 11:19 AM
To: [EMAIL PROTECTED]
Subject: Date problem


I am using java.sql.Date which is deprecited and when I add this date it
adds some other value for date

say I add
 java.sql.Date d = new java.sql.Date(2000,9,11);
It adds in the database as
10/11/3900

I am using jBoss 2.4  as App server and Orcale 8i as database

Which is the most appropiate data format to be used????

Also in Jboss I may have to add the new class in standardjaws.xml, by
default it uses java.sql.Date

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to