Add a delta to a date using functions

First, search the and this forum. Maybe your question has been answered! The can help, too. Still stuck? Delete this line and proceed. (had to remove links for some reason)

What I’m trying to do

Add a duration or a delta to date.

I have a property shown as a column in a base and I want to add 18 months to that date and show it in a computed column.

The property Date of Manufacture I’m using is a date type.

Things I have tried

I’ve checked the functions help (would link here but forum is disallowing it) and can’t find a function for a delta.

I’ve tried adding an arbitrary value to see if that helps e.g. date(note["Date of Manufacture"]) + 3000 but this just breaks the column.

Maybe simply this ? :thinking:

note["Date of Manufacture"] + "18M"

… the "18M" being 18 months :blush: (see here: Date arithmetic)

Spot on! Thank you very much. Very much missed the syntax page as assumed it was just explaining the YAML format.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.