You have 10 different dates, it consists of past & future dates.
Bot should check how many old dates & how many new dates
oldDatesCount = dtDates.AsEnumerable().Count(Function(row) CDate(row("Date")) < DateTime.Now)
newDatesCount = dtDates.AsEnumerable().Count(Function(row) CDate(row("Date")) >= DateTime.Now)
Regards,
1 Like
How to give 10 different dates using excel?
Change OldDateCounts variable datatype to Int32
1 Like
in excel the format is DD/MM/YYYY?
Try this
oldDatesCount = dtDates.AsEnumerable().Count(Function(row) DateTime.ParseExact(row("Date").ToString(), "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture) < DateTime.Now)
Thank you very much
got the solution
in excel using this formats helped MM/DD/YYYY
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.



