# Thread: Problems Calculating a 28 day Future Date to fall on the 1st Monday After

1. ## Problems Calculating a 28 day Future Date to fall on the 1st Monday After

Hi All,
Could anyone help I have spent countless days and nights up like a zombie trying to figure and resolve the above for a project I have to complete. I have done a lot of research on the internet trying to find the answer and finally found this forum where there is a recently updated tutorial of the DateCalc tutorial. I have found the handout very helpful and it has guided me on sorting out some other date issues and setting the dates in my mail merge to ordinal dates (I am in the UK).

However, as my Microsoft skills don't really extend to programming I did try to have a go and follow the tutorial piece which does the following:
quote "Calculate the( day & date) of a given day of the week, 90 days in advance
The following field adds 90 days to today’s date, then finds the nearest following 2nd or 4th Monday of the month...."

where I tried to practice amending the switch information to fit my scenario as in the above tutorial section it kept failing. I am totally lost, as apart for the weekday information which I do understand, I can't understand what each line of the instruction is doing so I don't really know what to amend to get what I want. So I wonder if anyone can help.

The scenario I have in my mail merge is when a user creates a mail merge letter the 'Todays' date is the date which is inserted into the letter, then there is a field blank field where I need my calculated result to go I need to calculate which is as follows:

- Using tomorrows date as the first day, Calculate the Day and date of the 28th day and if the 28th day does NOT fall on a Monday provide the date of the next following Monday's date, if the 28th day does fall on a Monday then state that date result. Basically the 28th future date must fall on a Monday otherwise set the date as the next immediate Monday after.

That's it, there are no concerns to do with holidays or bank holidays or anything.

could someone please guide me here I would be so grateful then I could stop worrying and panicking.

KindestRegards Marie

2. I suspect you are not getting answers because this is not a simple problem. I think it can be done. The post you referred to is the one that I go to when I need to do something complex.

Suggestion, break it down into steps.

1. You want to have a field that gives you the day of the week 28 days after your first date. That will always be the day of the week of your first date.
2. You want a field to test for the day being a Monday.
3. If it is not a Monday, then you want to add enough days to get it to be a Monday. Use that to set the amount to add to your first date.
4. Construct you final date field based on that number.

3. ## The Following User Says Thank You to Charles Kenyon For This Useful Post:

mariejoe (2013-07-05)

4. Thanks Charles I've taken your advice and more or less worked it out now.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•