This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
First of get the current date by using Java.util.Date. After that using JDBC API insert the corresponding values into the database. Let me know if u have still probelem. Thanks
Originally posted by ramkumar chandramohan: hi, IN JSP, i have a problem in inserting today's date into a database ,please suggest me . Thanks Ramkumar.c
Srinivasa Rao S
ramkumar chandramohan
Greenhorn
Joined: Nov 19, 2001
Posts: 17
posted
0
hi, ya first using the calendar class i got the today's date ,when i trying to insert into the database i am geting a problem.Then by using util.Date i tried still i am getting a problem ,so please help me out with more details. Thanks Ramkumar.c
what exactly is your problem? - the date not being inserted correctly? - the date being inserted as a different date? - the date not being inserted at all? - an exception being thrown?
ramkumar chandramohan
Greenhorn
Joined: Nov 19, 2001
Posts: 17
posted
0
hi , Ya,date not being inserted at all and the exception being thrown
Originally posted by dagmar timler: what exactly is your problem? - the date not being inserted correctly? - the date being inserted as a different date? - the date not being inserted at all? - an exception being thrown?
you need to get your date string in the proper format meaning get it in the format "01-12-1999 12:00:00" and insert into the database field which is of DATE type
regards,<br />Dharmesh Chheda
ramkumar chandramohan
Greenhorn
Joined: Nov 19, 2001
Posts: 17
posted
0
hi dharmesh, Thanks for ur timely help. bye C.Ramkumar
Originally posted by Dharmesh Chheda: [B] you need to get your date string in the proper format meaning get it in the format "01-12-1999 12:00:00" and insert into the database field which is of DATE type [/B]