Dear Friends,
I have one task, When product expiry date is reached alert should come before one month like"your product is expired after 30 days".
I am storing expiry date in the format "mm/yyyyy".
how to acheive this task without dd part?
Please suggest me.
Regards
Prasanna.
Munesh SharmaPosted May 1, 2016, 11:17 AM
List result = new List();
DateTime startDate = new DateTime(2012, 1, 8);
DateTime endDate = new DateTime(2013, 1, 3);
DateTime temp = startDate;
endDate = new DateTime (endDate.Year, endDate.Month, DateTime.DaysInMonth(endDate.Year,endDate.Month));
while (temp <= endDate)
{
Console.WriteLine((string.Format("{0}/{1}", temp.Month, temp.Year));
temp = temp.AddMonth(1);
}
Rajeesh MenothPosted May 1, 2016, 2:35 AM
ali tuncerPosted May 1, 2016, 12:21 AM
Manas MohapatraPosted May 1, 2016, 12:00 AM