Dear Gurus, i have written some code to display the date as shown below.
java.util.Date myDate = new java.util.Date();
SimpleDateFormat dateformat = new SimpleDateFormat("dd-MMM-yyyy");
String myString = dateformat.format(myDate);
System.out.println(myString);
The date appears fine, however, my question is how do i manipulate the date in terms of displaying the next 5 days to it? For example the result from above is "24-Aug-2001". How do I get it to display the dates for the next 5 days? Example "25-Aug-2001", "26-Aug-2001", "27-Aug-2001", "28-Aug-2001" and "29-Aug-2001"? I understand I will need a for loop to do this.
Any help will be greatly appreciated!! Thanks!!