Check the date

how to check the date that is written in a cell
image

with the dates that are in column A ?
image

I need to select the dates that are greater than the one in the cell

@teslyak9437

read the cell then use filter datatable or linq query to get only dates that are greater than thsi date

or use filter excel and filter excel as you need

cheers

Convert them into datetime format and then compare since you have to find ones which are greater

How it to do in StudioX

  1. Use Read range and store data inside datatable.

  2. If date is constant in column C then use it manually in assign activity or use datatable and then for each activity.
    date2= DateTime.ParseExact(“01.05.2024”,“dd.MM.yyyy”,System.Globalization.CultureInfo.InvariantCulture)

  3. Use for each row in datatable and inside use assign activity as below for column A
    date1 =
    DateTime.ParseExact(CurrentRow(0).ToString,“dd.MM.yyyy”,System.Globalization.CultureInfo.InvariantCulture)

  4. Inside same for each loop compare date 2 with date1 from step 2 using simple if and do the needful

@teslyak9437,

Here is a solution for this.

Code:
ExcelFilter.zip (60.7 KB)

Thanks,
Ashok :slight_smile:

Read all data and use the date tryparse which return the boolean value if its true the its valid date or its invalid date

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