Libreoffice not comparing dates correctly

image

Basic IF formula (ex=if(date1>date2,“Y”,“N”) not evaluating correctly.
I’ve opened the file and set the corresponding columns (C and J) as dates (MDY), but am getting weird results when comparing dates.

This might be the link that JohnSun intended to give, Faq/Calc/How to convert number text to numeric data - The Document Foundation Wiki

3 Likes

No, that’s right - in this case, J9 is indeed greater than C9. Because the first character in string J9 is 9, and the first character in string C9 is 7. And 9>7, right?
And all because these are not dates, but text strings. The real date in the Function Wizard window looks like this, without quotes:

Date As Date

By the way, changing the FORMAT of the cell will not help, you also need to change the type of value (here they wrote otherwise about a variety of methods - search and replace or Text To Columns …)

4 Likes

Thank you! :slight_smile: