Comparing Excel column data of date with system date

I want to compare the date of my excel data with system date. If it matches the matched rows will be copied to another sheet or excel file. But i’m not sure how to do it.

1 Like

Hi @nibir08,

Welcome @nibir08 to the community…

1.Take the date from the excel and compare that with Now.ToShortDateString ,this will give you the system date.

2.Then you can continue with your process…


1 Like


Welcome to UiPath Community

1.use Excel Application scope in it use Read Range read the excel and store it in a Data table Dt1.
2.use assign and get system“dd/MM/yyyy”)
3.parse the system date
4.use For each row we need to parse the date column,use Assign
DateTime.ParseExact(row(“column name”).ToString(),“MM/dd/yyyy hh:mm:ss”,System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat) use IF condition

A Manohar


Hi @nibir08,

I’ll suggest you to follow the steps below.

  1. Use Read Range to get excel data into DataTable variable. (DT)
  2. Use Assign activity to filter DataTable with todays date. (As given below)
FilteredDT (DataTable) = DT.Select("[Dates] = '#"+DateTime.Today.ToString("MM-dd-yyyy")+"#'").CopyToDataTable

Dates —> Dates column name.

  1. Now you’ve filtered datatable (FilteredDT), so using Write Range you can put that data into another sheet.

That’s it. :slight_smile:

1 Like


what should i write in condition?
actually i’m new to uipath and still learning.


with system date

It worked!! Thnx a lot :smiley:

1 Like


Happy automation…:grinning::grinning::grinning:

It worked like a charm :smiley:
thanx a lot :smiley:

You’re very welcome, @nibir08. :slightly_smiling_face:

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