Le 04/03/11 10:36, Norbert Zawodsky a écrit :

Hi Norbert,


> 
> SELECT DATE(`datetime-field`) AS `workdate`, SUM(`field-2`),

I tried the following with the table data below :

id  dt
0  30/12/99 00:00
1  04/07/05 00:00
2  31/12/99 00:00
3  31/12/99 00:00
4  03/01/1 23:59

using the following query :

SELECT CAST ( "dt" AS DATE ) FROM "timeout"

This gave the following displayed results in the query :

-2
2010
2958463
2958463
-693595

However, if I select all of the results returned as displayed above, and
then copy-paste them into this e-mail reply using Cmd-C/Cmd-V, I get this :

1899-12-30
1905-07-04
9999-12-31
9999-12-31
0001-01-01 ---> out by 2 days compared to entered value


This is with the OOo SQL parser switched on.

Weird huh ?

This means that although the values are mostly correct (except for last
one which is incorrectly shown as 0001-01-01 instead of 03/01/0001) in
the underlying system, they are displayed incorrectly in the Query
result within OOo.

So there is some rather unpleasant date paser/display/formatting error
happening here.

If I now switch the OOo SQL parser off, I get these results :

30/12/99
04/07/05
31/12/99
31/12/99
02/01/1 --> out by one day compared to the entered value


This is very bizarre. Tested on OOo 3.3.0 final and Mac OSX 10.6.6
Any comment from the devs ? Open a bug issue ?


Alex









--
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help

Reply via email to