Date Comparison Unexpected result

dasberry
dasberry ✭✭
edited 06/17/24 in Formulas and Functions

Option 1: =IF(([Last_Updated_Date]@row - $[Last_Updated_Date]$1) < 0, "Up to date", "Please Update Before Proceeding")

Option 2: =IF([Last_Updated_Date]@row < $[Last_Updated_Date]$1, "Up to date", "Please Update Before Proceeding")

I am writing the result in a column name Template_Updated which is Text/Number Column data type in the same sheet where dates are listed.

Last_Updated_Date column is a Date data type:

$[Last_Updated_Date]$1 = 05/22/24

[Last_Updated_Date]@row = 05/03/24

Output should be FALSE and produce "Please Update Before Proceeding", However, I get the TRUE value "Up to date".

If I invert the operator, I get correct results.

I also checked values of output with the following formulas:

=$[Last_Updated_Date]$1 - [Last_Updated_Date]@row returned 19

=[Last_Updated_Date]@row - $[Last_Updated_Date]$1 returned -19

Clearly, I missing something on calculating difference between dates here and would appreciate any input that could help alleviate this issue.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!