you seem to enter your dates as text and not as real dates. To enter dates use the following least error prone procedure ( based on the dates of your question)
- Remove all formatting from your cells
- Enter in ISO format:
Now (and not before entering your dates) format the cells you want 'em to look like
- Now you should be able to use
DAYS() function to calculate the days between two dates.
*) You can use your locale format (which I don’t know). See
Tools -> Options -> Language Settings -> Languages -> Option: Date acceptance patterns about how LibreOffice accepts dates in your locale.
Background (why I describe it using ISO dates):
Entering dates depends on some language settings of your LibreOffice installation which in turn determine whether LibreOffice recognizes the values entered as a data or as a text. And I’m pretty sure, that LibreOffice failed to recognize your values as date. I guess you see the values left aligned and this would be a clear indication that the dates are not real calc dates (in terms of LibreOffice real dates are integer [=numbers)) but text. In addition note: Formatting cells does not determine how you could enter dates, i.e. it doesn’t determine/influence the date recognition algorithm of LibreOffice.
Thus the answer(s) to your question: How can I know if my cells contain date values as far as the spreadsheet is concerned
- Format the cell as number, for today (2020-02-07) it should show:
43868 (which is the 43868th day since 1899-12-30)
- See the alignment: Number (=dates) are right aligned, while text is left aligned (if you are using default cell styles / no direct formatting)
Hope that helps.
If the answer helped to solve your problem, please click the check mark () next to the answer.