I want to compare hours like i have a sheet with different hours eg 04:35, 05:56 and i want to comapre them with 04:30 plz tell the syntax to compare these hours

i want to compare hours like i have a sheet with different hours eg 04:35, 05:56 and i want to comapre them with 04:30.

Hi
welcome to uipath community
hope these steps could help you resolve this
–use excel application scope and pass the file path as input
–use read range activity and get the output with the variable of type datatable named outdt
–use for each row loop and pass the above variable as input
–inside the loop use a if condition like this
Datetime.ParseExact(row(“yourcolumnname”).ToString,“hh:mm”,System.Globalization.CultureInfo.InvariantCulture) > Datetime.ParseExact(“04:30”,“hh:mm”,System.Globalization.CultureInfo.InvariantCulture)
if the condition passes it will go to the THEN part or will go to ELSE part

Kindly try this and let know for any queries or clarification
Cheers @amit_joshi

1 Like

is there any way that i can do the same with filter datatable activity.

1 Like

Fine
we need to convert the time to configurable datatype so using filter datatable wont be feasible
here you go
hope its resolved
time.zip (15.9 KB)

Cheers @amit_joshi

1 Like