August 12, 200817 yr Does anyone have a suggestion concerning how I can calculate the date of the 3rd Friday for a month. Thank you.
August 12, 200817 yr Well, the 3rd friday will always land between the 15th and the 21st (inclusive). Now, you can calculate the correct date based on what day the first of the month is with this sort of scripting: Date ( MonthNum; 21 - Mod(DayOfWeek( Date(MonthNum;1;2008)); 7); 2008) Where MonthNum is a field with the number of the month you want in it. Check the attached file for an example. test.zip Edited August 12, 200817 yr by Guest Added Example File
August 12, 200817 yr Well, here is another option which eliminates hard coding at all: Let ( [ m = Month ( date ) ; y = Year ( date ) ; d = Date ( m ; 1 ; y ) ] ; d - Mod ( d ; 7 ) - 2 + 21 )
August 12, 200817 yr Author Y'all are great!!! Thank you for the quick response. I appreciate it very much.
January 23, 201114 yr Well, here is another option which eliminates hard coding at all: Let ( [ m = Month ( date ) ; y = Year ( date ) ; d = Date ( m ; 1 ; y ) ] ; d - Mod ( d ; 7 ) - 2 + 21 ) Something strange here. It calculates fine except January 2011. When I put any date in January the formula tells that the 3rd Friday in January,11 is January, 14 2011. But it's the 2nd Friday. Does somebody know why?
January 23, 201114 yr Try = Let ( [ d = date - Day ( date ) + 1 ] ; d + Mod ( 6 - DayofWeek ( d ) ; 7 ) + 14 )
Create an account or sign in to comment