Assign : String was not recognized as a valid DateTime to DateTime variable

Reading an excel file and storing the date as a date time variable however I am getting an error for this date “7/2/2022” in the excel file. The format is dd/MM/yyyy.

When the robot reads in the cell it prints it as, “07/02/2022” 00:00:00.

Code Here:



Try below expression.


The issue is that your string “07/02/2022 00:00:00" is not recognized. You can replace “00:00:00” by empty string and try again.

Try the expression below.


Hi @Nelson.R ,

If the formats are all dd/MM/yyyy and maybe some have the time formats as well.

Then maybe we can only consider the first half of the Date value by Split.

We can Check if the Below Works :


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.