To find the date after 5 days from the given date

Hi all,

I want to find the next dates till after 5 days from a given date.

if I have todays date as 01-05-2019 then I want the output as 02-05-2019,03-05-2019,04-05-2019,05-05-2019,06-05-2019 like wise

Thank you

You can add to a list using For Each Loop

If you want to add to particular date,
DateTime dt = new DateTime(year,month,day) and use dt.AddDays() inside for loop.

List<DateTime> lst = new List

For i=1 to 5
{
    lst.Add(DateTime.Now.AddDays(i))
}
3 Likes