Hi Frank,
Frank Schönheit - Sun Microsystems Germany wrote (7-11-2008 13:47)
I'm looking at a problem with data in an OOo Datasource.
It is about an MSDE-database running on Win 2000 Pro US SP4 Version
5.00.2195.
That is used as source for an OOo (2.4 on Win XP SP3 version 5.1.260)
datasource with use of the Microsoft Access Driver version 4.00.6305.00.
Now the problem: dates come in the OOo datasource as numbers.
Importing the fields in Calc, and setting the cells to a date format,
converts the numbers to a date, but a wrong one. There is some
regularity in the off-set, but not fully. As far as seen in the
investigation:
Difference in years is 99 or 100
Difference in month = 0
Difference in days is 1 or 2.
Does anyone have a clue where to localize the exact problem or how to
solve it?
In general, this might be a matter of the "null date"
(Tools/Options/Calc/Calculate/Date). Formatting a cell as Date just
means interpreting the number in this cell as "number of dates passed
since the 'null date'".
So, I suppose that in real, all numbers are wrong by some N, which, when
interpreting as days crossing year boundaries, manifests as you describe
above.
A little test has been done with reference date: 13-12-1953 (DD-MM-YYYY)
Setting Resulting date
day offset .. in OOo Calc
30-12-1899 ... 14-12-2052
01-01-1900 ... 16-12-2052
01-01-1904 ... 15-12-2056
Try entering the date 1.1.1900 in your table (outside OOo), and check in
OOo: It should appear as "0" (since Base itself always uses a Null Date
of 1.1.1900). If that's not the case, the error is somehow on the driver
side (either OOo's or the ADO driver).
Indeed looks as if a driver is driving us mad :-\
Cor
--
Cor Nouws - nl.OpenOffice.org marketing contact
= "2008: The Year of 3" = www.nieuwsteoffice.nl =
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]