Calc cell formats

Good evening
I do have (naturally) a number of spread sheets.
One is a list of my patients.
It includes columns with name, sex, age, date of birth etc.

I did create a page style, where I tried to set "numbers" to standard
(because there are NO decimals!)
and "date" to "1999/02/10".

(the file originally was a Lotus123 file, saved in Excel 2003 format,
read with Calc and then saved as ODS)
However, when I apply that style, the "date" which had been
unintelligible 5-digit numbers changes to the
specified format, but at the same time columns with the age of patients
(TWO digits, no calcuations whatsoever)
and consecutive numbers switch to a row of three # =because they are to
narrow to display the "1900/02/10) inserted.
What is this nonsense all about???
Why is the age of a person (e.g. 33) be replaced by a nonsense date?

Also, while I specified the date as given above, opening the very same
file under kubuntu, it suddenly is reverse to 02/10/1999. Why?

AND the style I specified does not seem to be retained.
When I close the file and reopen (in particular if this is on another
computer) it, the settings seem to have vanished.

Thank you.
Thomas

I am thinking the cell is formated to a date format.
That number 0 is referenced to 1899-12-30, so when changed to dates 0 to
33 show these numbers. Interestingly, excel uses a simpler date, but last
time I checked it didn't work with negative numbers, but calc does??

0 1899-12-30
1 1899-12-31
2 1900-01-01
3 1900-01-02
4 1900-01-03
5 1900-01-04
6 1900-01-05
7 1900-01-06
8 1900-01-07
9 1900-01-08
10 1900-01-09
11 1900-01-10
12 1900-01-11
13 1900-01-12
14 1900-01-13
15 1900-01-14
16 1900-01-15
17 1900-01-16
18 1900-01-17
19 1900-01-18
20 1900-01-19
21 1900-01-20
22 1900-01-21
23 1900-01-22
24 1900-01-23
25 1900-01-24
26 1900-01-25
27 1900-01-26
28 1900-01-27
29 1900-01-28
30 1900-01-29
31 1900-01-30
32 1900-01-31
33 1900-02-01

<users@global.libreoffice.org>
Date sent: Fri, 2 Oct 2015 19:38:50 +0900

Wonderful. And HOW do I tell Calc (AND remember that setting!) that entering simply "33" in a cell is NOT a date???
As I said: I tried to set numbers to standard and date to "1999/01/10" format.
The page style I tried to create allows ONLY one OR the other ...

I do not understand, why it has to convert all those simple numbers to dates.
Thomas

I do have (naturally) a number of spread sheets.
I did create a page style, where I tried to set "numbers" to standard (because there are NO decimals!) and "date" to "1999/02/10".

o Spreadsheet page styles do not have cell formatting, so your attempts will have failed.
o If by "standard" you mean General (apologies if this is a locale or language difference), this does not limit numbers to having no fractional places. To do this, you need to select something like "-1234" (format code "0"). But General will display no fractional places for integral values.

However, when I apply that style, ...

Remember that your page style does not affect cell formatting at all.

... the "date" which had been unintelligible 5-digit numbers changes to the specified format, ...

They are not entirely unintelligible, though are not meant to be easily recognised. Dates (and date/times) are stored as the number of days (and fractions of a day) since the date origin. They appear as dates only when properly formatted. Remember that their appearance is entirely dependent on formatting and not the underlying data.

... but at the same time columns with the age of patients (TWO digits, no calculations whatsoever) and consecutive numbers switch to a row of three # =because they are too narrow to display the "1900/02/10" inserted. What is this nonsense all about?

This is because you have (nonsensically?) chosen to format the age values as dates. Ages are not calendar dates, of course, so this was unwise.

Why is the age of a person (e.g. 33) be replaced by a nonsense date?

You have chosen to format the relevant cells as dates. The internal value 33 will appear as the date 33 days after the date origin.

Also, while I specified the date as given above, opening the very same file under kubuntu, it suddenly is reverse to 02/10/19[00]. Why?

The operating system is irrelevant, I think. But what is relevant is the locale setting at Tools | Options... | Language Settings | Languages | Language of | Locale setting (though this may be inherited from the operating system).

AND the style I specified does not seem to be retained. When I close the file and reopen (in particular if this is on another computer) it, the settings seem to have vanished.

I think the idea here is that the date value you exemplified - 1900-02-01 - is indicated differently by default for users in different locales. In the everyday format, with the year last, the order of day and month needs to be appropriate for the user to understand it correctly. Otherwise, your example date, 10 February, may be read as 2 October. If you want date values to appear the same for all users, regardless of their locale (and with the risk that the dates will probably be misunderstood), I think you need to construct the representation yourself as a text string. You can do this very easily using the TEXT() function.

And HOW do I tell Calc (AND remember that setting!) that entering simply "33" in a cell is NOT a date?

Simply by not choosing to format the relevant cells as Date.

As I said: I tried to set numbers to standard and date to "1999/01/10" format. The page style I tried to create allows ONLY one OR the other ...

No: page styles do not affect cell formats, so cannot be used somehow to restrict cell formats the relevant pages may contain.

I do not understand, why it has to convert all those simple numbers to dates.

It doesn't: it does this only because you ask it to. (And there's no "conversion", only different representation - which means that you can set everything right by correcting the cell format, without changing the underlying data.)

I trust this helps.

Brian Barker - privately

PLEASE! This is the exact same matter in all spreadsheets of the past 30
years. This has never changed and it will not change in future.

Spreadsheets know decimal numbers and text. Both types of values are
explicitly NOT convertible by any kind of formatting attributes.

You can enter anything including "123" and "=SUM(A1:B3)" as literal text
by formatting the cell as text _before_ entering the value or by a
preceeding apostrophe. Otherwise, _any_ of your spreadsheet applications
will _always_ try to interprete your input as a number or as a formula
because this is what all spreadsheets make useful.

All dates, times, currencies, percents, booleans, scientific numbers,
fractions are nothing but different number formats for the _same_
decimal values which means that the date 2009-07-06 is the _exact_same_
value as 40000 (try out) and so are 4000000%, 7/6/2009, 6/7/2009,
4,00E+004, 40.000,00 € and $40,000.00. However, all these visual
representations of fourtythousand are different strings of text when
entered as text. You must never format any spreadsheet cells as text
unless you know exactly that you need that (in very rare cases, actually).

If you want to enter any kind of date on the num pad, the following used
to work with all types of spreadsheets, including LO 3.5, but LO 3.6
messed it up.
20/ --> this month's 20th day
20/7 --> this year's 20th of July
7/20 --> same in US context
The appearance of that entry is completely unrelevant as long as you
entered the correct value which is 42205 in case of 20 July 2015. You
can format that value any way you want but it has to be the correct
number. LO introduced that idiotic "date recognition pattern" in the
language options which may make everything more complicated than the
above simple entry pattern.

When importing plain text from files or from clipboard, you must never
forget to check the "special numbers" option unless you know exactly
that you want to avoid full number recognition.

Unlike Excel, booleans are not a third data type. Boolean is just a
number format.

All the rest (including the availlable number formats) depend on the
global locale setting in the language options.

I disagree with that opinion. It is a great thing that the user can adjust the pattern of characters of an date. I prefer to use the
ISO system, but receive dates formated with the american system.

I disagree with that opinion. It is a great thing that the user can
adjust the pattern of characters of an date. I prefer to use the
ISO system, but receive dates formated with the american system.

This has nothing to do with that "date acceptance pattern". You can
enter ISO dates into a normal spreadsheet program, you can import text
values representing dates from any locale and when opening somebody
elses document, the one and only important matter is that the values are
right.
That pattern has nothing to do with your preferred number format for dates.

And it is badly implemented.