# How to subtract a number from a date

Topic Labels: Formulas
Solved
3022 10
cancel
Showing results for
Did you mean:
5 - Automation Enthusiast

hey, whats the formula to subtract a week from a field with a date?

thanks alot!

1 Solution

Accepted Solutions
14 - Jupiter
``DATEADD({Date Field}, -1, 'week')``
10 Replies 10
14 - Jupiter
``DATEADD({Date Field}, -1, 'week')``
5 - Automation Enthusiast

I’m trying to do something similar, but got an error…

Here’s the formula :
DATEADD({Shipping Date}, -{Days to maturity}, ‘day’)

Shipping Date is the date of shipping the crop order.
The Days to maturity is a lookup field from another table describing my crops.
I want to know my planting date by subtracting the number of days to maturity from the order date.

The formula return an error. Please can you tell me what I am doing wrong ?
Thanks alot !
Phil

14 - Jupiter

Just curious… if you remove the “-“ that’s before your second field name, does that at least solve the problem of the formula throwing an error?

5 - Automation Enthusiast

Nope, no error, just give me the same date as in Shipping date…

14 - Jupiter

Is `{Days to Maturity}` a number field? Formula field?

5 - Automation Enthusiast

It’s a lookup field from another table. In it’s table it is an integer.

14 - Jupiter

Try this:

``````DATEADD(
{Shipping Date},
0 - VALUE({Days to maturity}),
'day'
)
``````
5 - Automation Enthusiast

It produces an error.

14 - Jupiter

Ok, remove the `VALUE()` portion: