Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 17th, 2005, 10:31 PM
harshika harshika is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 24 harshika User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 1 m 33 sec
Reputation Power: 0
Question need help urgent..how to get dates to add to database

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;
}
}

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > need help urgent..how to get dates to add to database


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT