Get date of the first Sunday and Monday in April

I need to get date of the first Sunday and the day after (Monday) in April.

Hi @markosc !

I have done this in the attached workflow.
I saved the first day of April to check the day of the week and using that I obtained the first Sunday and the first Monday on that month.
If you only needed the first Sunday and then the Monday after it, you need to follow the instructions in the comment section of the flow.

Hope it was helpful! (21.1 KB)

Hi @markosc

Use assign activity

First Sunday

firstSun = Enumerable.Range(1, Date.DaysInMonth(2021, 04)).Select(function (d) New Date(2021, 04, d).ToString("dddd dd/MM/yyyy")).Where(function (x) x.Split()(0).Equals("Sunday")).Take(1)(0).Split()(1)

Monday After first Sunday

monAftFirstSun = Date.ParseEaxact(firstSun, "dd/MM/yyyy", Nohting).AddDays(1).ToString("dd/MM/yyyy")

It works, thanks.

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