I am working in an integrated environment (IBM Process Server) and I am not able to import anything, can only use standard java functionality.
How can I add x number of months to a given date?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Given that you have Date imported by default, you can add a number of months to the date object by the following:
NOTE
You can use external classes from Java SE by using their full package name. i.e., even if you cannot add
import java.util.Calendar;to the top of you.javafile, you can still create a calendar object by executingjava.util.Calendar cal = java.util.Calendar.getInstance();