Ask Your Question

Can you compare dates in LO (ex =if(date1<=date2,1,0)? [closed]

asked 2013-08-12 16:30:28 +0200

gfkbob gravatar image

I have not been able to compare dates with the above formula. Is there a catch?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-11-06 07:38:48.440058


You need to provide more info. Do you get any error message? What is your LibreOffice version and operating system name/version? How did you input date data in which format - write sample of how you typed in date. What is your language settings? Tools | Options | Language Settings | Languages | Locale settings?

L-user gravatar imageL-user ( 2013-08-12 16:40:11 +0200 )edit

No error message, just doesn't give the correct response. Ubuntu. Libreoffice 4.0.22. I entered dates in two cells (A1,A2). In cell A3 I entered the formula =if(A1>=A2,1,0). The answer is the same no matter what the dates are (if A1> or if A2>).

gfkbob gravatar imagegfkbob ( 2013-08-13 00:33:37 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2013-08-12 16:43:25 +0200

L-user gravatar image

Above formula should work just fine. Check to see if you have correct format cell defined for dates fields. Select both cells - right click on them - Format Cells - Category = Date. The cell where the formula is check that format cell is defined as Number.

edit flag offensive delete link more


Will this work if one of the date cells is a function (=today()?

gfkbob gravatar imagegfkbob ( 2013-08-13 16:12:37 +0200 )edit

Yes. .

erAck gravatar imageerAck ( 2018-06-14 19:52:03 +0200 )edit

Question Tools

1 follower


Asked: 2013-08-12 16:30:28 +0200

Seen: 4,073 times

Last updated: Aug 12 '13