Problem in Openoffie calc

Discuss the spreadsheet application
Post Reply
Bjoern.Buechel
Posts: 3
Joined: Tue Dec 18, 2007 10:35 pm

Problem in Openoffie calc

Post by Bjoern.Buechel »

I made a function as following:
=TAG(HEUTE())
i mean the result has to be the Number of the day today. If i calculate with them it is ok. bay the View at openoffice cals is one day minus. What is the reason?


Regards

Bjoern
8-)
huw
Volunteer
Posts: 417
Joined: Wed Nov 21, 2007 1:57 pm

Re: Problem in Openoffie calc

Post by huw »

That is

Code: Select all

=DAY(TODAY())
in English I think. Can you give us an example of the calculations that are ruturning values one day out? Remember, you can add days to a date, but not add two dates together and get another date. The latter is nonsensical.
User avatar
DiGro
Posts: 173
Joined: Mon Oct 08, 2007 1:31 am
Location: Hoorn NH, The Netherlands

Re: Problem in Openoffie calc

Post by DiGro »

Bjoern wrote:.......bay the View at openoffice cals is one day minus. What is the reason?
Could it be that Calc sees 31-12-1899 as day 1 and you are probably counting on 01-01-1900 to be day 1 ?? :roll: :roll:

See: Tools > Options OpenOffice Calc > Calculate foor your setting.
____________
DiGro

AOO 4.1.15 (Dutch) on Windows 11. Scanned with Ziggo Safe Online (F-Secure)
huw
Volunteer
Posts: 417
Joined: Wed Nov 21, 2007 1:57 pm

Re: Problem in Openoffie calc

Post by huw »

DiGro wrote:Could it be that Calc sees 31-12-1899 as day 1 and you are probably counting on 01-01-1900 to be day 1 ??

See: Tools > Options OpenOffice Calc > Calculate foor your setting.
I tried changing that, but it made no difference to the result returned.
Bjoern.Buechel
Posts: 3
Joined: Tue Dec 18, 2007 10:35 pm

Re: Problem in Openoffie calc

Post by Bjoern.Buechel »

huw wrote:That is

Code: Select all

=DAY(TODAY())
in English I think. Can you give us an example of the calculations that are ruturning values one day out? Remember, you can add days to a date, but not add two dates together and get another date. The latter is nonsensical.
thanks for this information,
by the english input =day(today())the visible Value is ok. By the german version the visible Value is one from the day befor. I tryed this with your input =Day(tody()) with englisch settings and with my input =TAG(HEUTE()) it has to be the same but the View result is not the same.
eg. in then english version i see for then 19.12.2007 the 19 and at the german version the 18. that only thy few. The calculation with this value is ok.
huw
Volunteer
Posts: 417
Joined: Wed Nov 21, 2007 1:57 pm

Re: Problem in Openoffie calc

Post by huw »

Odd. Perhaps you have discovered a bug in the German localisation. What is Tools > Options... > Calc > Calculate > Date set to?
Bjoern.Buechel
Posts: 3
Joined: Tue Dec 18, 2007 10:35 pm

Re: Problem in Openoffie calc

Post by Bjoern.Buechel »

For my opinion it is a mistake in the german translation. If i use the english settings its works properly i have open this as a problem in the german community Forum. but the answers are not satisfied. If i use the Function in excel it is ok.

tanks for your help
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problem in Openoffie calc

Post by Villeroy »

Merry Christmas, Frohe Weihnachten!

Code: Select all

=DAY(TODAY()) => 24
Switching to German GUI:

Code: Select all

=TAG(HEUTE()) => 24
Regardless which day is day #0.
Do not apply any format. The same formula with format "D" (or "T" with german cell number format locale) yields 23 because it shows the day portion only of 1900-01-23, which is the 24th day after day #0 (1899-12-30).
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Problem in Openoffie calc

Post by acknak »

Are you sure it's not this bug: Date decrements by one day in Calc.?
AOO4/LO5 • Linux • Fedora 23
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problem in Openoffie calc

Post by Villeroy »

acknak wrote:Are you sure it's not this bug: Date decrements by one day in Calc.?
acknak wrote:I believe[*] this is your issue: Issue 76623: Wrong formatting and displaying for some dates.
...
I don't think so because that issue is about some formatting problem and this thread was initiated with a appearently wrong formula result. =DAY(TODAY()) which should always return the day number of today's date as an integer number.
Bjoern, you can show today's day number by 3 methods at least:
1. =DAY(TODAY()) whithout any date/time formatting. The cell's real numeric value is 24 at the time of writing this.
2. =TODAY() formatted as "D" (or "T" with german cell number format locale). The cell's real numeric value remains the number of days since day #0 (39440 at the time of writing this).
3. =TEXT(TODAY();"D") (or "T" with german cell number format locale) yields a text value, representing today's day number. The text is "24".
Option 1 with any sort of date formatting will display the formatted value of number 24 which might not be what you want since day #24 is January, 23rd of year 1900 and thus the formatted cell shows 23.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply