Niklas Nebel wrote:
Robin Laing wrote:

Robert Horvat wrote:

1. Cell value A1=1
set format to date and you get 31.12.99 this is WRONG, right is 1.1.


This is one of the options in
  Tools > Options > OOo Calc > Calculate.

Change the Date setting and this will change.


No. The selected date in the options dialog is represented as value 0, not 1. The option 1900-01-01 is for compatibility with the old StarCalc 1.0 application (we can still read files from StarCalc 1.0).

The default setting differs from what might be expected because we didn't want to include the bogus day 1900-02-29, which exists in some other spreadsheets, like Excel. For dates after that day, the value representation is the same. For dates before it, our representation is different, but consistent. As Excel doesn't allow negative date values, compatibility issues are limited to January and February of 1900. In return, we get sane semantics for date values (for example, someone writing an add-in doesn't have to worry about this).

Niklas


Nice description as to why the date option is changable. I made my post showing that the "1" in cell A1 will change as the date option is changed. At least it did for me. :)

If Date is set to 12/30/1899, cell A1 displays 12/31/1899.
If Date is set to 01/01/1900, cell A1 displays 01/02/1900.
If Date is set to 01/01/1904, cell A1 displays 01/02/1904.

Now I did come across a problem with having this setting. If I enter a date into a cell and then change this date, my dates are all changed to represent this change. At least the data is saved with the document so it isn't a major problem.



--
Robin Laing

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to