cancel
Showing results for 
Search instead for 
Did you mean: 

Filter Excel Column after 3 days from current days

AsitabhaDeb
Level 6
HI Experts,

I have written below code, for filter the one column with after 3 days from current days.
Dim worksheet as object
Worksheet = GetWorkBook(handle,nothing).ActiveSheet

Dim today As DateTime = DateTime.Today
Dim dueDate As DateTime = today.AddDays(3)
Dim crdDate As Date

crdDate = Date.Parse("09-11-2020")
If (DateTime.Compare(crddate, dueDate.Date) >= 0)
End If

I have applied 3 data item as input variable.

1. Handle= Number
crd date = Text
Due date = Text
But I am getting the below error message. Can you please help me to solve the case. It very urgent.
Internal : Could not execute code stage: Object of type 'System.String' cannot be converted to type 'System.DateTime'.

------------------------------
Asitabha Deb
------------------------------
1 REPLY 1

I guess your code is returning dateTime type and you are trying to store it in string. So change the the type from string to DateTime type. Or vice versa

------------------------------
Amlan Sahoo
RPA Consultant
Equinix
------------------------------
Regards,
Amlan Sahoo