Excel automation for finding dates

Hello all,
I have a scenario like in Excel in colum B I have some dates and in column A I have some different dates so I need to check that the date in column A should not be within 30 days from column B. How can I check this condition.

Thank you

@sanjay_gowda Kindly share some sample inputs

Hi @sanjay_gowda

How about this expression

DtBuild.AsEnumerable.Where(Function(x) Not(String.IsNullOrWhiteSpace(x("column A").ToString)) AndAlso Not(String.IsNullOrWhiteSpace(x("column B").ToString)) AndAlso (CDate(x("Column A").ToString)<=(CDate(x("Column B").ToString)))).ToArray.copytodatatable

Regards
Gokul

IMG-20220921-WA0004__01

Hi @sanjay_gowda
Kindly refer to this Xaml file, You may get some idea.

Forum_Date_Compare_Excel.zip (74.5 KB)

Beyond +or-30 days from Colum B, Column A should filter

image