• Future Dates in Fields (2000)

    Author
    Topic
    #360078

    I am constructing a template with a date field that is (of course) updated every time the template is loaded.

    Is there a way to set that date field so that it is x number of days ahead of the current date? In essence, a “due date” out in the future?

    Viewing 1 reply thread
    Author
    Replies
    • #541332

      I’ve done this by inserting a single cell Excel worksheet. The cell in the worksheet had the formula for the future date in it =Today() + 30 as an example.

    • #541387

      There are several ways to do this and an add-in (free} available to construct such a field. The add-in can handle up to 28 days (given the vagaries of our Roman Empire calandar).

      The following is an example of a field that gives you the date two weeks from the day a document is created, in regular written English format:

      Creation date: July 9, 2001 – desired field result = July 23, 2001
      Creation date: July 23, 2001 – desired field result = August 6, 2001
      Creation date: December 20, 2001 – desired field result = January 3, 2002

      { QUOTE “{ SET Delay “14” }{ SET “DaysInMonth” { IF { CREATEDATE @ “MM” } 2 { = round(30.575*{ CREATEDATE @ “MM” },0)-ROUND(30.575*{ = { CREATEDATE @ “MM” } -1 },0) }{ IF { = MOD({ CREATEDATE @”yy” }, 4 ) } > 0 “28” “29” } } }{ SET “NextMonth” { IF { CREATEDATE @ “MM” } = 12 “1/97” “{ = { CREATEDATE @ “MM” } + 1 }/97 } }{ IF { = { REF Delay } + { CREATEDATE @ “dd” } } <= { DaysInMonth }{ CREATEDATE @ "MMMM { = { REF Delay} + { CREATEDATE @ "dd" } }, yyyy"}{ QUOTE { NextMonth @ "MMMM" } { = { REF Delay } + { CREATEDATE @ "dd" } – { DaysInMonth } }, { IF { } CREATEDATE @ "MM" } 12 { CREATEDATE @ “yyyy” }{ CREATEDATE @ “{ = 1 + { CREATEDATE @ “yyyy” } # “xxxx” }” } } } }” }

      dizzyIf this doesn’t make your head spin, you’re made of sturdy stuff! I wouldn’t recommend trying to duplicate this by hand. This field was created by a downloadable Add-In created by Chris Woodman. I don’t think you want to try to create such a field by hand. I have it in a document that you can download from my site if you want to play with it. There are also VBA solutions. The above field, two different links for the Add-In downloads, and some VBA solutions are found at Calculated Dates in Word.

      Hope this helps.

    Viewing 1 reply thread
    Reply To: Future Dates in Fields (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: