View previous topic :: View next topic |
Author |
Message |
timrichardson Pure-blooded Human

Joined: Oct 07, 2007 Posts: 39
|
Posted: Sun Oct 07, 2007 12:51 pm Post subject: Base forms date format: last digit of year is missing |
|
I made a database form with default date formats.
I changed the date format in the table to dd mmm yy and the date controls on my form changed automatically. Good. I see for example 12 Nov 06 on the form.
Next, I changed the data format in the table to dd mmm yyyy. Now, the form date controls miss the last digit. So I get a date like 12 Nov 200 when I want to see 12 Nov 2006 |
|
Back to top |
|
 |
Lorinda Captain Mifune

Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
|
Posted: Sun Oct 07, 2007 1:53 pm Post subject: |
|
Two questions:
-is the date control on your form large enough to accomodate the longer date format?
-when you open the form in design view (control-click the form and choose Edit), and then double click the the date control, what does is say under date format? (General tab) |
|
Back to top |
|
 |
timrichardson Pure-blooded Human

Joined: Oct 07, 2007 Posts: 39
|
Posted: Tue Oct 09, 2007 11:08 pm Post subject: |
|
Hi. Yes, the control is physically large enough.
The control has property 'maximum text length' set to 0
It is not a date control. It is a text box, so there is no date format. This is the control I got when I made the form using the form wizard.
I will see if I can find a 'date control'.
Changes made to the date field format in the table automatically change the format used on the the form, except that 4 digit dates only show the first three digits. My work around is to change the date format (on the table) to two digits. |
|
Back to top |
|
 |
timrichardson Pure-blooded Human

Joined: Oct 07, 2007 Posts: 39
|
Posted: Tue Oct 09, 2007 11:19 pm Post subject: |
|
OK, I changed the text field to a date field on the form. However, I can not find options to use a custom format, ie to use format dd-mmm-yyyy
I am using yyyy-mm-dd ; this is ok.
What I see with text fields and the missing final digit of YYYY format for year is a bug.
What should I do to report it? Go to openoffice.org and report it there, or does the neooffice community like to do this?
regards
Tim |
|
Back to top |
|
 |
Lorinda Captain Mifune

Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
|
Posted: Wed Oct 10, 2007 7:01 am Post subject: |
|
I did some more playing today, and discovered a way for you to get the date format the way you want it:
-Right-click or control-click on the control for the date
-Choose "Replace With" and then "Formatted Field" from the contextual menu.
-double click the control; the Field Properties window opens.
-click on the "..." button in the same row as "Formatting"
-a new window opens allowing you to choose the formatting of the field. In this window, you can set your custom formatting.
Note that I didn't actually try to set a custom formatting. I didn't go any further than finding the window and seeing the spot where you could set custom formatting.
Sorry this is sort of piece-meal help. I'm still learning Base myself.
In terms of the text field issue, I can't reproduce it. I would suggest that you download and install the latest patch. (2.2.2 patch 0; you can install it over 2.2.1). If that doesn't fix it, file a bug in Bugzilla. Just be sure to read the Bugzilla Guide before doing so.
Lorinda |
|
Back to top |
|
 |
timrichardson Pure-blooded Human

Joined: Oct 07, 2007 Posts: 39
|
Posted: Sun Oct 14, 2007 1:22 am Post subject: |
|
I found an easy workaround for my problem, which is not really a bug.
OpenOffice has the same behaviour as NeoOffice and the same fix.
THis means that if you want to reproduce it you should be able to. You need to use a date format in the Table definition which requires a lot of characters (long month names for example).,
The text box control has a property "Max. text length'.
If defaults to 0, which I thought meant "as big as is required" but in fact it means 8 I think.
By setting this value to 15, I see what I want. This makes the text box control an interesting way to show dates on a form, because it will always reflect the date format of the underlying table field, even when the database field format is change after the form is created. |
|
Back to top |
|
 |
Lorinda Captain Mifune

Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
|
Posted: Sun Oct 14, 2007 3:17 am Post subject: |
|
Thanks for reporting back on the fix!
Lorinda |
|
Back to top |
|
 |
|