May 19, 2019 12:14 PM
hey, whats the formula to subtract a week from a field with a date?
thanks alot!
Solved! Go to Solution.
May 19, 2019 01:37 PM
May 19, 2019 01:37 PM
DATEADD({Date Field}, -1, 'week')
Nov 13, 2019 08:24 AM
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
Nov 13, 2019 10:19 AM
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?
Nov 13, 2019 10:21 AM
Nope, no error, just give me the same date as in Shipping date…
Nov 13, 2019 10:23 AM
Is {Days to Maturity}
a number field? Formula field?
Nov 13, 2019 10:24 AM
It’s a lookup field from another table. In it’s table it is an integer.
Nov 13, 2019 10:26 AM
Try this:
DATEADD(
{Shipping Date},
0 - VALUE({Days to maturity}),
'day'
)
Nov 13, 2019 10:29 AM
It produces an error.
Nov 13, 2019 02:06 PM
Ok, remove the VALUE()
portion: