Help

Add a Look Up Field to a Date Field

Topic Labels: Dates & Timezones
873 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Mark_Anson
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi,
I cant seem to get this to work…

DATEADD({1st Sow Date},SUM({Min Germ Days},‘Days’))

{1st Sow Date} is a Date field with Manually entered Data and {Min Germ Days} is a lookup field from another table.
The output is the same as the date of {1st Sow Date}
If I make {Min Germ Days} a Number field and manually enter the data I get the right result.
Eg If I have 10/10/2020 and enter 10 at {Min Germ Days} I get 20/10/2020 (European Date Format)
If I get the 10 from a look Up field I still get 10/10/2020

Thank you in advance and apologies If I should have been able to find this.
Ive looked for hours but cant find it…

Thanks everybody but I stumbled acrross an answer for myself, I changed to lookup field to a rollup field and used sum in the rollup for the agregate and it works fine…
Hope this helps someone else.

2 Replies 2
Zollie
10 - Mercury
10 - Mercury

Your code has an error - DATEADD() takes 3 parameters, you’re currently only using two. The third paraemter is the time unit, which you currently have in a SUM function (not sure why you’re using that).

If SUM was mistakenly added, then this code will run fine:

DATEADD({1st Sow Date},{Min Germ Days},‘Days’)

Here’s how DATEADD works:

DATEADD(
    some date that you'll be operating on,
    the number of time units you'd like to add to that date,
    the time unit type (such as days, months or years)
)

I’d recommend while working on your code, you write it out with indentations like I have above. It’ll help you understand what you’re writing/avoid errors. Just make sure to take out the indentations etc. before trying to run the code.

Mark_Anson
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you
That was the original code I used but it still wouldn’t work on the lookup field but works fine by making the field a rollup.

That is the code I am now using.

Love the way you layed out how the formula works… That has made it easier to. Understand.