Hi Manish
I had the same problem while saving the date in the oralce Db
use this when you are constructing the date
Remeber that this "date" is the java.util.date
===================================================
String strFormat = "EEE, d MMM yyyy hh:mm:ss zzzz";
SimpleDateFormat sdf = new SimpleDateFormat(strFormat);
date = sdf.parse(strDate);
======================================================
where my format of the date which i was getting was of type Wed, 7 Sep
2001 12:22:21
You can refer to the SimpleDateFormat class and construct your date format
like that as you prefer .............
When you are saving the date in the oracle DB then convert this date object
into the java.sql.date as
( i.e. in your insert query )
==============================
pStmt.setDate(your columns, new java.sql.Date(date.getTime()));
===============================
I hope that this will solve your problem.............
Regards
Hemant
Manish Syal
<Manish.Syal@UMIT To: [EMAIL PROTECTED]
L.COM> cc:
Sent by: A Subject: Date problem
mailing list for
Enterprise
JavaBeans
development
<EJB-INTEREST@JAV
A.SUN.COM>
09/26/01 11:18 AM
Please respond to
Manish.Syal
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".
===========================================================================
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".