How do we add 15 days to the current Date which will not cross the month
and resultant Date will never be Sunday? If it is Sunday make it Saturday?
Example > If Current Date is 17/08/2010 (DD/MM/YYYY)
Then Resultant Date is 31/08/2010 (DD/MM/YYYY) [Donot Cross the Current Month.]
Also 31/08/2010 would never be Sunday.
If it is Sunday make it 30/08/2010 (Saturday). [Date is not Sunday.]
Resultant Date will not cross the Current Month and will not be Sunday in VB.NET ?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Deepak Bhatia142 reputationPosted Aug 4, 2010, 10:25 PM EDT
I have sorted down your problem. Try this code
DateTime dateToday = DateTime.Now;
DateTime After15Day = dateToday.AddDays(15);
while (After15Day.Month != dateToday.Month)
{
After15Day.AddDays(-1);
}
if (After15Day.DayOfWeek == DayOfWeek.Sunday)
After15Day.AddDays(-1);
Deepak Bhatia142 reputationPosted Aug 4, 2010, 10:26 PM EDT