How to check whether date in excel cell has been more than 60 days?

Fine
—hope this would help you
—use excel application scope and pass the file path as input
—then use a read range activity and get the output with a variable of type datatable named outdt
—now use a for each row loop and pass the above variable Outdt as input
—inside the loop use a if condition with condition like this
DateTime.ParseExact(row(“Yourcolumnnameof EndDate”).ToString.Substring(0,10),”dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture) > Now.AddMonths(-2)

Or if this shows any error like stri gbis not recognised as valid DateTime then we need to check with the format of the column value
—so use a write line activity inside the for each row loop mentioning the input as
row(“yourcolumnnameofEndDate”).ToString
This will print us the value of date from that excel column
—so based on that we need to mention the format here in ParseExact method, here in the highlighted area
DateTime.ParseExact(row(“Yourcolumnnameof EndDate”).ToString.Substring(0,10),”dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture) > Now.AddMonths(-2)

Here I have used SubString to get only the format of “dd/MM/yyyy” which is 10 character letter so
Substring(0,10) was used

Simple isn’t it
Kindly try this and let know for any queries or clarification
You were almost done
Cheers @Yusuf_Rahmaniac

3 Likes