Help

Re: Error in formula

1455 0
cancel
Showing results for 
Search instead for 
Did you mean: 
delta1286
5 - Automation Enthusiast
5 - Automation Enthusiast

I have two columns when a date is inserted in the first column the second column adds 20 days and populates a date which is fine, however I keep getting an error in the second column when a date in the first column has not been entered, what do I need to add in the formula so if the date is blank in the first column no error will be returned in the second column, thank you guys!

Error-AT

4 Replies 4
ambigram0
4 - Data Explorer
4 - Data Explorer

Hi there! You could do this with an IF statement at the start to assess whether the “Requested Agreements” field is empty, i.e.

IF({Requested Agreements}="","",DATEADD({Requested Agreements},20,‘days’))

But that seems to mess with formatting and you end up with results like “2019-07-16T00:00:00.000Z”. Someone else might have a better solution to that, but you could use a LEFT formula to trim everything past the actual date, leaving you with:

IF({Requested Agreements}="","",LEFT(DATEADD({Requested Agreements},20,‘days’),10))

Does that work for you?

This should work, but when checking for blanks it’s usually better to drop the conditional statement. Airtable sometimes has trouble determining what is blank and what is not. I’m sure there are many others on the forum that can explain why this is much better than I can… I’ll try to find a better post about it and will link to it here.

Anyway, I would write the formula like this:

IF({Requested Agreements}, DATETIME_FORMAT(DATEADD({Requested Agreements}, 20, 'days'), 'M/D/YYYY'))

Thanks for your input, but it still returned an error, the solution provided by Needs_Admin worked a treat.

Thank you so much worked first time just had to change the day and month at the end to suit us here in the UK.