Dynamically Calculate Dates Using Formula Fields

Using a formula field is one of the easiest ways to infuse your template with smart automation. In this example, we’ll show you how to automatically calculate a date, based on another date in the document, using the DATEADD function.

Let’s say you have a Date field called “Effective Date”. And you want to have another Date field that is “Expiration Date” that will always automatically be 30 days after “Effective Date.”

1. Create the “Effective Date” field

Here we’ll just create a regular Date field and specify a format for it.

2. Create the “Expiration Date” field

When creating the “Expiration Date” field, instead of selecting “Date” as the field type, select “Formula.”

DATEADD({Effective Date}, 30, "days")

Choose the Effective Date field from your drop-down list of fields (this will appear in your Formula surrounded by curly braces), specify the number of days (30), and then specify the unit of time ( “days”).

dynamic dates 2

This will tell Woodpecker to automatically add 30 days to whatever the “Effective Date” is. You can learn more about the available options for the DATEADD function here.