This might be a simple question and hopefully a very simple solution. I can’t for some reason get my head around this.
I have a spreadsheet with two columns. Column 1 has Dates and Column 2 has Names. All the dates are Thursdays.
I’m using For Each Row loop from Read Range data table.
IF today is 21/04/2022
Check if Thursday date 28/04/2022 exists
IF TRUE then Sweet!
IF FALSE then send an email to notify
The rows will grow. Additional dates will continue to be added and deleted.
The end result is to process automation then check and notify by email if the next Thursday date from today exists. That way additional dates should be added.
I understand that you will iterate through data table with for each, within for each
String `CurrentRow_date` = "31/03/2022"
DateTime` Day_wk` = DateTime.ParseExact(`CurrentRow_date`,"dd/MM/yyyy",nothing) --> this converts String type date to DateTime type
IF ` Day_wk`.DayOfWeek.ToString.Equals("Thursday")
then Send mail
Hope this is helpful. If this solves mark this as solution to help others with similar issues
sounds like as a part of flow you want to calculate the next Thursday from a given date.
do the parsing as described above
the next thursday calculation we can do as following (rule, if today is thursday take next week thursday)
Enumerable.Range(1,7).Select(Function (x) Now.AddDays(x)).Where(Function (d) d.DayOfWeek = 4).First()
Instead of Now you can also use any other DateTime variable
Enumerable.Range(1,6).Select(Function (x) YourDateTimeVar.AddDays(x)).Where(Function (d) d.DayOfWeek = 4).First()
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.