I got a date data read from excel in string format, and I want to compare today date or other date read from the datasheet.
How should I get the results?
I cannot directly minus the string and “cdate” doesnt work:
Read Cell: StringConverter cannot convert from System.DateTime.
1 Like
I heard I can also use datediff?
but it keeps saying Read Cell: StringConverter cannot convert from System.DateTime.
1 Like
Hi @Andy_Chow
Can you do me a favor can you screenshot your code .
thank you.
cheers
Happy learning:D
or maybe the format of the date read from the excel is already in datetime format?
1 Like
the error before is fixed by selecting preserve format
but no still cannot calculate the diff between date and today
datediff(dateinterval.day, convert.todatetime(date1), now.date)
This video will solve your problem @Andy_Chow : Learn How To Compare Dates In UiPath - YouTube
Mark it as a solution if it works.
Cheers,
Parth