How to write a if condition to check date

can any one help me how to write if condition to check the date in the date cell is equal to today’s date or previous date

@bpt.teja1996 - you can try below

convert.ToDateTime(row(“DateColumn”)).ToString(“MM:dd:yyyy”) = now.AddDays(-1).ToString(“MM:dd:yyyy”) or convert.ToDateTime(row(“DateColumn”)).ToString(“MM:dd:yyyy”) = now.ToString(“MM:dd:yyyy”)

2 Likes

Thankyou somuch @GBK

@GBK but my date in excel is in the format of MM/DD/YY

I have another query i have a excel automation i was using read CSV and i was performing automation by taking for each row activity now i need after the completion of that row it should write complete in status cell of that row how to do that

@bpt.teja1996 - pls change the date format as per your excel format…