You need to sign in to do that
Don't have an account?
rsg00usa
Add n days to a date
Being new to Apex can someone guide me in how I would add days to a date similar to how it is done in Java:
GregorianCalendar worldTour = new GregorianCalendar(1872, Calendar.OCTOBER, 2);
worldTour.add(GregorianCalendar.DATE, 80);
Date d = worldTour.getTime();
DateFormat df = DateFormat.getDateInstance();
String s = df.format(d);
System.out.println("80 day trip will end " + s);
Thanks,
Scott
use addDays & friends.
Date d = getSomeDate();
Date nextWeek = d.addDays(7);