On 28/06/2012 06:19, Gary Aitken wrote:

Hi Gary,

I have a form connected to a mysql database with a datetime field.
The first time I enter a date for a new record, with the time portion of the 
field still empty, the day is changed to be one day less.  For example, if I 
enter 2012-06-27 the date is reformatted and changed to 06/26/12.  If I then 
clear out the date and time, and enter the time, the date is set to 01/01/1800.

The offset is an old, old bug that has haunted OOo for years and raises its ugly head on a regular basis, then gets forgotten about (or the bug report dismissed), as it doesn't always seem to be reproducible. In the past, I've opened at least one I can definitely remember, but possibly 2 or 3 bug reports for this terrible behaviour, but each time they were closed as unreproducible. There was also a discussion somewhere on the dba OOo mailing lists at one stage, but I guess that could only be found now by trawling the archives of those lists.


If I then try to change the date by deleting it and entering 2012-06-27 again, 
it always resets to 01/01/1800.  What's going on?

Also, how do I change the default date display for everything in OO as a whole?

Under Tools > Options, you can set date handling for Calc, but unfortunately the different modules use different datetime routines/functions for the handling of dates, which is possibly one of the reasons why these problems occur. Another more basic reason might be rounding errors in date calculation within OOo, but I don't know where that could be found in the source code.



Or if that's not possible, how do I change the date display for a datetime 
field in a base form?  I tried ungrouping the label + datetime field, then 
ungrouping the datetime field, then doing Format but everything is greyed out.

If you are in Form design mode, then you should be able to access the form's controls properties by right mouse button clicking on a field control representing the bound data field, and then setting its "properties" from the context menu. If you can't do this, then either your form is not properly bound to the underlying data, or else it is a bug.


Alex


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to