Bug 152464 - Differency between two date (days) is not working
Summary: Differency between two date (days) is not working
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-11 11:44 UTC by joubert.attila
Modified: 2022-12-13 20:28 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
This is an example sheet. (8.50 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-12-11 17:05 UTC, joubert.attila
Details
Screenshot from valid type (64.18 KB, image/png)
2022-12-11 19:50 UTC, joubert.attila
Details
Bug 152464 (10.00 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-12-11 21:03 UTC, lol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description joubert.attila 2022-12-11 11:44:43 UTC
The built-in function of the Hungarian-language Libreoffice Calc, which specifies the difference between two dates in days, does not work. Gives an #ÉRTÉK error signal.

An example:

A1 cell (Date type in hungarian format): 2022.12.05.
A2 cell (Date type in hungarian format): 2022.10.23.

The expression in numerical cell: =NAPOK(A1;A2)

The result is #ÉRTÉK
Comment 1 LeroyG 2022-12-11 16:18:58 UTC
Press Ctrl+F8. If do you see the date font in blue, it is a date; but if do you see the "date" in black, it is text, and the formula DAYS return #VALUE!.
Comment 2 joubert.attila 2022-12-11 17:03:47 UTC
After carefully setting the type of cells and pressing Ctrl + F8, nothing happened. I am using Ubuntu 20.04.
Comment 3 joubert.attila 2022-12-11 17:05:32 UTC
Created attachment 184094 [details]
This is an example sheet.

I attached an example...
Comment 4 lol 2022-12-11 17:46:30 UTC
Your date is formatted as text (black font). See comment 1. So the formula returns  an error.

Change the format of the cells to date.
Comment 5 joubert.attila 2022-12-11 19:48:52 UTC
Please believe me, I did. If I look at the field type (for me) it shows a date! Maybe I should reinstall Libreoffice? I am attaching a screenshot...
Comment 6 joubert.attila 2022-12-11 19:50:13 UTC
Created attachment 184099 [details]
Screenshot from valid type
Comment 7 lol 2022-12-11 21:03:02 UTC
Created attachment 184100 [details]
Bug 152464
Comment 8 lol 2022-12-11 21:05:36 UTC
Ok. In your sample file the values in cell A1 and A2 are formatted as text. In the dialogue they are shown formatted as date.

I enter the same values and it works. See attached file.

Can you exactly describe, how you enter the values and what you do.
Comment 9 joubert.attila 2022-12-13 08:40:14 UTC
Hi Lol, thanks for the attachment. Really useful. I opened it and the ones you entered work well for me, although the lines I originally entered are still not good.
But, if I try to format my lines from your lines with the format brush, it doesn't work.
Otherwise, I set the format manually by right-clicking on the cell, selecting cell formatting from the floating menu, then selecting the date as the type and 12.31.1999 as the format.
Sincerely, Attila
Comment 10 LeroyG 2022-12-13 20:26:29 UTC
(In reply to joubert.attila from comment #9)
> I set the format manually by right-clicking on the cell,

After changing the format cell to Date, you must edit each cell for the change to take on.
An easy way to do that is with the Text to Columns tool (menu Data).

In this cases, before reporting a bug, I suggest to search in the ask.libreoffice.org site for help.

Changing status to Resolved - Not a bug.

Regards.
Comment 11 LeroyG 2022-12-13 20:28:13 UTC
(In reply to joubert.attila from comment #6)
> Created attachment 184099 [details]
> Screenshot from valid type

See that the (text)dates, remain left aligned.