How to add an integer no to a date so tat i can a new date
foe ex: date=10/11/2012
no=5
newdate=15/10/2012
**Any body plz help to solve the problem**
anandschiru
-1
Light Poster
Recommended Answers
Jump to PostFirst off, are you using a system
Date
(java.util.Date
) or a databaseDate
(java.sql.Date
)? I am assuming the former, but if you are working with a SQL database, you may be talking about the latter.Either way, you will want to use one of the
Jump to PostSchol-R-LEA gave you the answer. GregorianCalendar. Look it up in the API doc.
All 5 Replies
Schol-R-LEA
1,446
Commie Mutant Traitor
Featured Poster
anandschiru
-1
Light Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
arijith04
-5
Newbie Poster
JamesCherrill
commented:
Teaches nothing, just invites copy/paste cheating
-3
anandschiru
-1
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.