Date changed in table

Creating tables and queries
Post Reply
Peter52
Posts: 1
Joined: Thu Feb 22, 2018 5:36 pm

Date changed in table

Post by Peter52 »

Hello, I'm totally new to OO and I have the following question; I am having a table with a field in it called Date, however when I inout a date (for example 12-09-1655) it's okay but when I view the records later it's turned into 01-01-1800. What I have to do to solve this?
OpenOffice 4.1.5
Operating System Windows 7 Enterprise
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Date changed in table

Post by UnklDonald418 »

In Open Office Dates and Times are stored as a floating point double value with the date to the left of the decimal point and the time to the right with 0.0 being December 30, 1899. Dates prior to that are negative numbers.
If you run a query on your table the results should show the dates you entered.
But a Date control on a base form has a default minimum set to 1/1/1800.
You can change that if you right click on your form document and select Edit to open the form in the Design Mode.

If your date field is in a box on your form then right click on the box and and select Control or
If your date field is a column on a table control right click on the column heading and select Column.
To open the Properties: Date Field dialog.
On the General tab of the dialog locate the Date min property. While you can set it to an earlier date it won't only allow anything earlier than 1/1/1600.
That is probably because the Gregorian calendar used by OpenOffice was adopted October 15,1582 so any date functions or calculations on earlier dates could return incorrect values.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Date changed in table

Post by Villeroy »

HSQL can store Julian dates before Oct 1582. Using a formatted field or some textual control (edit box, combo box, pattern field) you can depict any date.
 Edit: Found a minor bug with Julian dates in Oct 1582, the month which has no 5th to 14th day because of the Gregorian change 
1/10/1582 --> 21/10/1582 [wrong]
2/10/1582 --> 22/10/1582 [wrong]
3/10/1582 --> 23/10/1582 [wrong]
4/10/1582 --> 24/10/1582 [wrong]
5/10/1582 --> 30/12/1899 [invalid date falls back to zero date]
...
15/10/1582 --> 15/10/1582 [OK]
16/10/1582 --> 16/10/1582 [OK]
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply