John Chamberlain Posted August 22, 2017 Posted August 22, 2017 (edited) I need a calculation that will return the day number (1st, 2nd, etc) for the first Monday in a given month (e.g. an input of 9/2017 would return "4") Any help is gratefully appreciated. Edited August 22, 2017 by John Chamberlain correction
comment Posted August 22, 2017 Posted August 22, 2017 You could have deduced this from the answer to your previous question. The date of the first Monday in a given month is = Let ( [ firstDayOfMonth = Date ( Month ; 1 ; Year ) ; diff = 2 - DayOfWeek ( firstDayOfMonth ) ] ; firstDayOfMonth + Mod ( diff ; 7 ) )
John Chamberlain Posted August 22, 2017 Author Posted August 22, 2017 Thanks for your help. I never saw an answer to my previous question because, even though I checked the "Notify me of replies" box, no email was ever sent. I checked that same box for this question and no message came through for your answer either.
Recommended Posts
This topic is 2915 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now