tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswar" <>
Subject Re: Inserting DATE into SQL server
Date Tue, 12 Feb 2002 04:23:16 GMT
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();
  sqlDate = new java.sql.Date(cal.getTime().getTime());


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?


To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message