- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Dec 09, 2024 02:06 PM
Solved! Go to Solution.
Accepted Solutions
![kuovonne kuovonne](https://community.airtable.com/legacyfs/online/avatars/3X/b/c/bcecb2d58f8302e9d9f520621c02ff41be54488c.jpeg)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎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')
)
![kuovonne kuovonne](https://community.airtable.com/legacyfs/online/avatars/3X/b/c/bcecb2d58f8302e9d9f520621c02ff41be54488c.jpeg)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎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')
)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Dec 10, 2024 07:26 AM
Worked perfectly, thank you so much!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Dec 10, 2024 07:29 AM
Thank you for explaining, Alexey! Do the spaces and line breaks impact the IF formula as well?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎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.
![](/skins/images/FE00829FDD2AE889FAB731D8F02A8942/responsive_peak/images/icon_anonymous_message.png)