Skip to main content

DATEADD() pulling the count from a lookup field

  • December 16, 2022
  • 2 replies
  • 23 views

Forum|alt.badge.img

Doing a simple add 2 or 3 days to a start date. 

DATEADD(Start,3,'days')   ---Note: the field names are purple but no longer add the {  } ??? I tried both ways.
 
That adds just fine, however, when I change the 3 to a lookup field called Days formatted as integer it seems to subtract a day. or not any at all with different variations.
DATEADD(Start,Days,'days')
Can a number be pulled from a lookup field be used like this or do I need to cast the value somehow to a #Numnber format? When I use a field in the same table that is a number (integer) it works as expected.

 

DATEADD(Start,number,'days')
 

 I've tried adding in timezone same for all using GMT and America/New York UTC -5. same issues

2 replies

Kamille_Parks11
Forum|alt.badge.img+25

Lookup fields, often return as arrays, even if there is just one number. You could use a Rollup that does MAX(values), or keep the Lookup field and adjust your formula to force the Lookup to be a number

DATEADD(StartVALUE(Days&""), 'days')

When field names are single word, you don't need the brackets.


Forum|alt.badge.img+1
  • New Participant
  • 1 reply
  • December 16, 2022
Kamille_Parks11 wrote:

Lookup fields, often return as arrays, even if there is just one number. You could use a Rollup that does MAX(values), or keep the Lookup field and adjust your formula to force the Lookup to be a number

DATEADD(StartVALUE(Days&""), 'days')

When field names are single word, you don't need the brackets.


Thank You! VALUE does the trick!...weird to have to add in &"". I guess Also hard to do a search for VALUE() LOL


Reply