tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswar" <...@globalleafs.com>
Subject Re: Inserting DATE into SQL server
Date Tue, 12 Feb 2002 04:23:16 GMT
Hi,
Thanks for your replies. I tested both of your methods and mine too. But in
all the cases I found the date to be inserted Random as "1899" or "1905" or
so on.

cal = Calendar.getInstance();
  cal.set(year,month,date);
  sqlDate = new java.sql.Date(cal.getTime().getTime());

or

totdate = year+"-"+month+"-"+date;


I printed the selected date in the browser, I see correct date as selected
by me in the browser. But when I look at the SQL server I see the date
inserted randomly. Could you please tell me where the problem is?

Uma


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message