Hello all,
I need to determine the last friday of each month.
In the situation of today being the last friday of each month to invoke a sequence. Thank you
What is the best way to go about this?
Hello all,
I need to determine the last friday of each month.
In the situation of today being the last friday of each month to invoke a sequence. Thank you
What is the best way to go about this?
Hi @alexis.garcia ,
Do you need the Date of the Last Friday as the Output?
Yes exactly
Hey,
I think it will be works:
lastFriday.7z (35.6 KB)
How do i open this>?
Thanks taking a look
it is 7zip.
Below you will find zip file and in Windows you can do right click and choose extract"
lastFriday.zip (2.5 KB)
Thanks i just tweaked that file you sent me
Thanks this works well !
Enumerable.Range(-6,7).Reverse().Select(Function (x) now.AddDays(- now.Day + 1).AddMonths(1).AddDays(-1 + x).Date).Where(Function (x) x.DayOfWeek = 5 ).First
or in Query Syntax:
(From i In Enumerable.Range(-6,7).Reverse()
Let d = myDateTime.AddDays(- now.Day + 1).AddMonths(1).AddDays(-1 + i).Date
Where d.DayOfWeek = 5
Select fr=d).First()
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.