Forum Discussion
MichaelTamoush
Qrew Captain
I don't have time to play around with it right now, but I have this in my notes. Not your use case but maybe you can reverse engineer it and use it to come up with a solution? Though, I can't help but think there is a much easier way. Lets hope @Mark Shnier (YQC) can come to the rescue!
My Notes:
Calculate the previous Thursday on or before a date (in a due date field). So for example, if the Due Date was a Monday, I wanted the date of the previous Thursday. No matter the due date, I wanted the date of the prior Thursday (or if the due date was a Thursday, then I want that Thursday).
For Prior Wednesday: [Due Date] - Days(Rem(DayOfWeek([Due Date])+4,7))
For Prior Thursday: [Due Date] - Days(Rem(DayOfWeek([Due Date])+3,7))
For Prior Friday: [Due Date] - Days(Rem(DayOfWeek([Due Date])+2,7))
etc.
(Sunday would be + 7, Saturday would be +1)
------------------------------
Michael Tamoush
------------------------------
My Notes:
Calculate the previous Thursday on or before a date (in a due date field). So for example, if the Due Date was a Monday, I wanted the date of the previous Thursday. No matter the due date, I wanted the date of the prior Thursday (or if the due date was a Thursday, then I want that Thursday).
For Prior Wednesday: [Due Date] - Days(Rem(DayOfWeek([Due Date])+4,7))
For Prior Thursday: [Due Date] - Days(Rem(DayOfWeek([Due Date])+3,7))
For Prior Friday: [Due Date] - Days(Rem(DayOfWeek([Due Date])+2,7))
etc.
(Sunday would be + 7, Saturday would be +1)
------------------------------
Michael Tamoush
------------------------------
PrashantMaheshw
4 years agoQrew Captain
Thank you Michael for your reply, I do not know how to use this logic to derive at second Tuesday of a month, But I will play with this.
------------------------------
Prashant Maheshwari
------------------------------
------------------------------
Prashant Maheshwari
------------------------------