Dec 09, 2024 02:06 PM
Solved! Go to Solution.
Dec 09, 2024 04:55 PM - edited Dec 09, 2024 04:55 PM
You are getting the error because the date functions expect a date input but are getting a blank instead. Also, unless there is a specific reason why you want the result to be a text string instead of a date object, you don't need DATETIME_FORMAT().
Try using this simpler formula.
IF(
{Most Recent Completed Event Date},
DATEADD({Most Recent Completed Event Date}, 9, 'month')
)
Dec 09, 2024 04:55 PM - edited Dec 09, 2024 04:55 PM
You are getting the error because the date functions expect a date input but are getting a blank instead. Also, unless there is a specific reason why you want the result to be a text string instead of a date object, you don't need DATETIME_FORMAT().
Try using this simpler formula.
IF(
{Most Recent Completed Event Date},
DATEADD({Most Recent Completed Event Date}, 9, 'month')
)
Dec 10, 2024 01:13 AM
Hi,
Formulas more flexible here, than in Excel.
IF( condition , if_true , if_false ) can be written as
IF ( condition , if_true ) . the default for third parameter is blank cell.
So if you want to check field for 'non-emptiness' just use IF({Field}, Your_function )
In your example, when field is empty IF(...) returns nothing and DATETIME_FORMAT(...) does not accept nothing as parameter, that's why you have error. To fix, follow solution by @kuovonne
Dec 10, 2024 07:26 AM
Worked perfectly, thank you so much!
Dec 10, 2024 07:29 AM
Thank you for explaining, Alexey! Do the spaces and line breaks impact the IF formula as well?
Dec 10, 2024 12:28 PM
Spaces and line breaks do not impact the formula, they just make it easier for the reader(s) to understand what is happening.