Studio Web: Validation Error comparing CurrentRow Excel Date with Today variable

Hello Community,

My name is Pravin, and I am currently working on a Library Management Automation project in UiPath Studio Web. The goal of the project is to iterate through an Excel workbook, identify students with overdue books, and send them an automated email notification.

The Challenge: I have been encountering a persistent validation error for the past two days within my If activity logic. I am attempting to compare a Due Date column from a For Each Row in Workbook loop against the current date (Today variable).

Hi @PRAVIN_T,

You’re getting the validation error due to a type mismatch.

In Studio Web, the Excel “Due date” value from For Each Row in Workbook is usually read as String, while Today is DateTime. You can’t compare them directly in the condition builder.

Use the expression editor and convert the Excel value:

DateTime.Parse(CurrentRow("Due date").ToString).Date = DateTime.Today

For overdue books:

DateTime.Parse(CurrentRow("Due date").ToString).Date < DateTime.Today

If the column may contain blanks, add a null check before parsing.

The key is to ensure both sides of the comparison are DateTime.

1 Like

Thank you so much for your reply sir

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