Skip to main content
All CollectionsWorking With Woodpecker FieldsMore about Formula Field
Dynamically calculated dates using formula fields
Dynamically calculated dates using formula fields

How to use the DATEADD function to calculate dynamic dates

S
Written by Shawn Moore
Updated over a week ago

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." There is a very easy way to do this using Formula fields and the DATEADD function.

Below, we'll walk through creating a Date field called "Effective Date" and a formula field called "Expiration Date" where "Expiration Date" is automatically always 30 days after "Effective Date." You can repeat this process for any number of Date fields and number of dependent Formula fields that you like. The sky's the limit! πŸš€
​

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." Then in the formula input box type:

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

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.

Did this answer your question?