# Thread: Date Calculation Election Schedule

1. ## Date Calculation Election Schedule

My efforts to tweak the field codes to calculate a date range hasn't been successful.

What's needed is an automatic update for the beginning and end of an organization's three-year election cycle. The formula I need to begin with is
for the start year:

{DATE (yyyy) - MOD({DATE yyyy}, 3), \@ "yyyy"}

that is, the current year less the MOD for the current year divided by 3, so that for 2013, 2014, and 2015 the result would be "2013."

The end of the election cycle would be that number plus three - "2016."
In 2016, the calculation would update so the two numbers would be "2016" and "2019."

It doesn't matter whether the result is a date or a 4-digit number.

I think I'm probably not extracting the year as a number to run this formula on. Any suggestions would be most welcome!

Sincerely,

axsc

2. Yes, indeed -- I've been a devotee of several versions of Date Calculation -- I have at least three on the desktop right now. I have a field code that adds a year, or subtracts a year, from the current year, but that format isn't helping with this particular approach. My best guess at this moment is that Word is contemplating "2014" as a date and therefore not letting me use it in a MOD argument as a number.

Thank you,

axsc

3. I am not sure that I really understand what you are trying to achieve but this appears to be what you are looking for

{={Date \@ "yyyy"} - Mod({Date \@ "yyyy"},3)}

4. ## The Following 2 Users Say Thank You to Andrew Lockton For This Useful Post:

axsc (2014-05-16),Charles Kenyon (2014-05-16)

5. Perfect! Your code produced the original number, and I added a "+3" at the end for the end date of 2016. This is one of those documents that goes on for decades, and having a field code automatically updating as necessary will be one more proofreading trap avoided.

Many, many thanks,

axsc

#### Posting Permissions

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