i have a date field in my database and two other date fields which are dependent on the first. i have to calculate two dates using the first input date. i have to calculate date after 3 months and 6 months. i have used servlets as mediator. i have used inbuilt functions like months after,and date+90(for three months) eg: if the user input 12-01-2001 i have to calculate 12-4-2001 and 12-7-2001 and insert in to table. but i could not do it from the servlet. can any one help in concern??
What is the error It may be due to database you are using Usually databases expect date to be in their default format like in oracle 12-JAN-2001 So if you try to put the date in other formats it may give error I hope I am right, may be there may be other causes for the error Regards
[This message has been edited by narayan kulkarni (edited February 06, 2001).]
Take up computer programming as fun and you will just enjoy it. Always keep in mind that in some way your program is going to make human life easier.
Joined: Feb 05, 2001
i am not getting any error but the values are not getting updated. i am using Access 2000
I dont think there should be any problem. You just add the date fields with required number of months,and insert into the database.I think the error is in the database. By the way what error you are getting.Is there any problem in database connetivity
Joined: Jan 31, 2001
Check out the database format for the date in Access which you have specified Access default format is I believe dd/mm/yy make If you specify it as short date it may accept Best thing would to debug would be to c&p the query you are executing in servlet in MS-Access query window and execute it It would allow you to find whether the query is correct There will be some sqlexception thrown in the webserver prompt
"sachin_ckd", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements. Thanks.