I have excel file where I have all my holiday dates. I need to check if today equals any of the date from the table, if yes - send mail, if not - continue with the process.
Hi @markosc ,
Read your excel to one datatable. Assign the current date to one variable
TodayDate = DateTime.Now.ToString(“yyyy/MM/dd”)
In"For Each Row" loop check with if condition
if ( row(“Date”) = TodayDate) then send email
For example I want to check if today = holiday. If yes, write “Holiday”, if it does not equal to any of the dates form excel write line “Working”. If I do it in for each row then it’s giving me Working for all the dates, and I want only one output/write line.
Please try this and let me know.
Todays_date = Now.ToString(“MM/dd/yyyy”)
ReadDT is your excel datatable
Col1 is your column name of holidays in excel
Use Assign Activity
List1 (List of Strings)=(From row In ReadDT.AsEnumerable() Select((row(“Col1”)).ToString)).ToList()
Thank you, it works.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.