Filter date inside same column into datatable

Greetings,

I want to make robot get dates only from excel into datatable for matching process but I am not sure how to make it work. Appreciate for simple solution.

image

Hi @DTECH

Please follow below steps
1.use read range activity to get the datatable
2.build a new datatable dtnew with date_descr as column name
3.use for each row activity to loop through the items
4.use if with contition DateTime.TryParseExact(row(0), “dd/MM/yyyy”, System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, Nothing)
4.a if true ,add datarow activity to add this datarow to dtnew

dtnew will have only dates now

Thanks,
Lakshmi

Flowchart.xaml (13.3 KB)

Im getting error due to object to string error. Kindly check on attached above. Also I include the sample of excel to grab date only.

test.xlsx (8.4 KB)

Flowchart.xaml (12.0 KB)
Please check this

Hi @DTECH ,

For this you can also try regex to verify the row values with Ismatch activity using the following pattern [0-9]{2}/[0-9]{2}/[0-9]{4}

Thanks

@DTECH can you please confirm if this worked?

Thanks, it works. Really appreciate :smile:

1 Like

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