|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
i want to get the date lendDate as today and declare dueDate as lendDate+13days how to do this.i send the code with this please help me to complete this..i'm using IDEA and the IDE and doing this application with jsp and java...........
package library.userif; import library.utils.DBManager; import library.main.SystemConstants; import java.util.Date; import java.util.Vector; public class AvrLoanBean { private Vector avrAccession; private String membershipNum; private Date lendDate; private Date dueDate=lendDate+duration; private int duration=3; public void setAvrAccession(Vector avrAccession) { this.avrAccession = avrAccession; } public String getMembershipNum() { return membershipNum; } public void setMembershipNum(String membershipNum) { this.membershipNum = membershipNum; } public Vector getAvrAccession() { return avrAccession; } public int addLoan() { int status; boolean retValue = false; try { retValue = DBManager.getInstance().addLoanAvr(membershipNum, avrAccession,lendDate,dueDate); } catch (Exception e) { System.out.println("AvrLoanBean:: Can't add details : " + e); } if (retValue == true) { status = SystemConstants.SUCCES_SAVE_DATA; } else { status = SystemConstants.ERROR_SAVE_DATA; } return status; } public void setLendDate(Date lendDate) { this.lendDate = lendDate; } public Date getLendDate(int year,int month,int date) { return lendDate; } } |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > need help urgent..how to get dates to add to database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|