search java calendar on the net.....it should explain lots
thank you I have done so. i have a small issue now. the following code segment is producing a wrong date on the year.
code: java
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH);
int day = cal.get(Calendar.DAY_OF_MONTH);
....
I am setting the date as below:
preqL.setReceiptDate(new java.sql.Date(year,month,day));//preqL is a local object
when I print it in the jsp it shows:: 3907-06-07 instead of 2007-06-07