
My Frequency Start Date is 24-08-2012
My frequency end date - not defined
Calculation Frequency is Weekly(Sunday)
My calculation will be from 24-08-2012 to the following sunday
My question is how to find the following date of sunday

Here is an example that determines the date on coming sunday from the specified date.
import java.util.*;
import java.text.*;
class GetDateExample
{
public static void main(String[] args) throws Exception
{
String str_date="24-08-2012";
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
Date date = (Date)formatter.parse(str_date);
Calendar cal=Calendar.getInstance();
cal.setTime(date);
while(cal.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY){
cal.add(Calendar.DAY_OF_WEEK, 1);
}
System.out.println("Date on coming sunday is " + formatter.format(cal.getTime()));
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.