How to filter And get row which celebrate Birthday today by the Date of Birth

hi Team,
i m Having set of birthdays i need to get all the row for today with out consider the year
like above is Their any way to get this Results

Thank you

Hi @Tharusha_Fernando

Please check this article

1 Like

Could you please share sample sheet(After masking/removing sensitive info)?


Filterdatatable.xlsx (45.2 KB)

Hi @prasath17

use this as a sample

Thank you

may we ask you to run following in immediat box and share the result with us:

In general we can try with following logic:

Just need to adopt the Date Conversion based on the screenshot from immediate Box run
As we can expect that no rows will be found, we will handle result defensive:

LeftSide: Result | DataType: List(Of DataRow)
Right side:

(From d In YourDataTableVar.AsEnumerable
Where Not (isNothing(d("regDate" )) OrElse String.IsNullOrEmpty(d("regDate").toString))
Where CDate(d("regDate").toString.Trim).toString("ddMM").Equals(Now.ToString("ddMM"))
Select r = d).toList

Based on Result.Count > 0
then: dtFiltered = Result.CopyToDataTAble
else: dtFiltered = YourDataTableVar.Clone


@Tharusha_Fernando - Since you have 1000+ rows in the excel , I am providing the LINQ solution…

  1. Read Range your sheet and call the output as dt

  2. Assign

     (From r In dt.AsEnumerable
     Where DateTime.parse(r("regDate").tostring).Month = Now.Month And  
     DateTime.parse(r("regDate").tostring).day = now.Day
     Select r).CopyToDataTable

Note: My date is 8/31 today so it is listed 8/31 bdays if your country date is 9/1 already it will show the 9/1 birthdays…

Hope this helps…


It woks @prasath17 Thank you Guys

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