Filter the Dates in Excel

How to filter the dates in column

Example : Input
Date
1/1/2022
2/1/2022
3/1/2022
4/1/2022
5/1/2022
6/1/2022
7/1/2022
8/1/2022
9/1/2022

In the output panel
6/1/2022
7/1/2022
8/1/2022
9/1/2022

Thanks…

@lomarnash643

Can you explain on what basis you want to filter the column

@Shiva_Nikhil

if u see in output panel
I need after the 5th date

I need 6,7,8,9 dates

Hi @lomarnash643

use this linq query

(
From row In DT
Where CDate(row(“Date”).ToString) > CDate(“5/1/2022”)
Select row
).CopyToDataTable

inside the for each loop
use write line
CurrentRow(“Date”).ToString

@lomarnash643

Dt.asenumnerable.where(Function(x) cdate(×(0).tostring)>cdate(“05/01/2022”)).CopyToDataTable

1 Like

Hi @lomarnash643

Try this

yourDataTable = yourDataTable.Select(“[Date] >= #6/1/2022#”).CopyToDataTable()

1 Like

@Dilli_Reddy
Can u share the workflow

@lomarnash643

use this workflow

use the linq query in assign activity

and run the workflow

1 Like

@Dilli_Reddy
Thank You
Its working fine,i got required output

Hi @lomarnash643

After using Read Range Workbook you can use this syntax in Assign activity

dtInput.AsEnumerable().Where(Function(row) 
    DateTime.ParseExact(row("Date").ToString, "d/M/yyyy", System.Globalization.CultureInfo.InvariantCulture) >= New DateTime(2022, 6, 1).CopyToDataTable()

@Shiva_Nikhil @Parvathy @lrtetala
thank you for the reply
Its working

2 Likes

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