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.
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…
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 date=datetime.now.toString(“dd/MM/yyyy”)
3.parse the system date
4.use For each row
5.now 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)
6.now use IF condition
I’ll suggest you to follow the steps below.
- Use Read Range to get excel data into DataTable variable. (DT)
- 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.
- Now you’ve filtered datatable (FilteredDT), so using Write Range you can put that data into another sheet.
what should i write in condition?
actually i’m new to uipath and still learning.
with system date
It worked!! Thnx a lot
It worked like a charm
thanx a lot
You’re very welcome, @nibir08.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.