Hi,
How do we find the last tuesday of the month based upon the input date.
example: input -> 08/02/2024
output-> 08/27/2024
Solved! Go to Solution.
@rishabhgupta36
We can use the DateTImeTrim to get the last day of the Month, then determine which week day of it in Number
after than, subtract the difference between the week day of last day and Tuesday from last day.
Hi @Qiu ,
Your workflow looks great, but the last expression may not work when the last day of the month is Monday ([WeekdayOfLast] = 1).
To deal with this case, it may be better to use Mod() as below.
LastTuesday2 = DateTimeAdd([LastDayofMonth],-Mod([WeekdayofLast] + 5, 7),"Days")
@Yoshiro_Fujimori
Good catch.
Thank you very much.
Thanks @Yoshiro_Fujimori @Qiu for your help.