How to filter data by date

Guys so i have a data like this

If i only want to take the data that have a join date same like the run do, how to do that?
Example : i run my automation today, i only want to take the data with join date at december 2022

Im sorry if my english is not that good, i hope u guys understand. Feel free to ask if u guys didnt understand my words.

Hi @Kelvin1

(Date.ParseExact(CurrentRow(“joindate”).ToString, “dd/MM/yyyy”,
System.Globalization.DateTimeFormatInfo.InvariantInfo).Month) = (DateTime.Now.Month) And (Date.ParseExact(CurrentRow(“joindate”).ToString, “dd/MM/yyyy”,
System.Globalization.DateTimeFormatInfo.InvariantInfo).year) = (DateTime.Now.year)

The above code check based on current month and year

(Date.ParseExact(CurrentRow(“joindate”).ToString, “dd/MM/yyyy”,
System.Globalization.DateTimeFormatInfo.InvariantInfo)).ToString(“MMMM”) Is “December” And (Date.ParseExact(CurrentRow(“joindate”).ToString, “dd/MM/yyyy”,
System.Globalization.DateTimeFormatInfo.InvariantInfo).year) = 2022

The above code will filter based on December month and year 2022

Hi @sangeethaneelavannan1 thanks for the answer, i want to ask 1 thing. Is it possible i assign both of that code to the assign activity? because i want to re-write to the excel when the data meet the condition

Hi @Kelvin1
Cclone the datatable by using above code

Add the datarow to new datatable
After write it in your excel

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