If() and date functions


Hi - I've noticed what appears to be a problem with if() and date functions.

One issue is seen here:

The "date" column is a "date column" and will only accept dates. The "year" column is a text/number column. The year column uses two different forumlas, which are shown in "column 4."

I would expect that the second line would show "2023" but if() fails - it's not clear whether the #INVALID DATA TYPE is the result of the IF() or the YEAR() or something else is going on. If I blank out the date column, the year column shows a 0 as expected.

Here's another example:

In this case, both the "date" and "new date" columns are configured as date columns. Again, the IF() in the second line is failing - I would expect it to return the same thing as in the first line. If I blank out the date, the "new date" blanks out as expected.

Is there something I don't understand about how IF is supposed to work?





Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!