may i know what is the datatype of FilterDt and the Dt1 must be datatable
are we trying to compare two datatable then its fine
else we need to validate this eexpression
The result What I am expecting is
1.Reading a Excel and storing in Datatable Dt1
2.in Dt1 there are many columns from that one column is Last_Date Column of Datatype Date.
3.Now i need to compare the Last_Date Column with the string resigned, later compared Data is stored in FilteredDt.
you can not compare DateTime with a String. You should convert one variable and then compare the same types.
Converting to String is quick and easy. Converting to DateTime can be a little tricky, but allows you to do more operations with the date. For example add or subtract days or months to your date, finding out if your date is before or after another date, or simply getting the name of the weekday on this date.