Date format in template

It is appropriate to say that I am running LibO 3.3.1 on a Mac running OSX 10.6.6.

I have a letterhead template which includes a date field (creation date). However, despite several attempts, I am unable to maintain the format of the date, which I want to present in iso-format: YYYY-MM-DD. Instead each time I open the template, the field has reverted to the US style date, MM/DD/YY.

How can I fix the date format as I wish it to be? This does not appear to be a question of the regional settings, since I have a custom setting including the iso-format for the date.

TIA

//James

Dear James,

James Wilde wrote:

It is appropriate to say that I am running LibO 3.3.1 on a Mac running OSX 10.6.6.

I have a letterhead template which includes a date field (creation date). However, despite several attempts, I am unable to maintain the format of the date, which I want to present in iso-format: YYYY-MM-DD. Instead each time I open the template, the field has reverted to the US style date, MM/DD/YY.

How can I fix the date format as I wish it to be? This does not appear to be a question of the regional settings, since I have a custom setting including the iso-format for the date.

Over here (LO 3.3.1 on Ubuntu 10.04) everything seems to work as expected. I created a template, inserted date, changed the field to that format, saved it, closed, re-opened LO and selected the template and the date format was correct. How was the template created?

Lorenzo.

Open a document, format it as I wanted, insert the date field, convert to iso-format, save as .ott in the templates folder. On opening it reverts always to US format.

//James

You apparently are saving it in the Template folder but not saving it as a
Template.
When saving, ignore Save, Save as...
Scroll down to Templates, then Save.

tink

You apparently are saving it in the Template folder but not saving it as a
Template.
When saving, ignore Save, Save as...
Scroll down to Templates, then Save.

Tink

//James

As I said.
Scroll down to Templates in the File Menu, then click on Save.
You will then be asked for a name.
Omit the suffix as Libre will add that, i.e. .ott

Tink.

Still doesn't work.

//James

Hi James

It works for me. LO 3.3.2.1 on a Mac 10.6.6

Tink

Well, to be sure it's not something in the original template, I just created a new one with nothing other than create date and saved it as you said using /File/Templates/Save. Same behavkiour.

I'm at a loss.

//James

Open a document, format it as I wanted, insert the date field, convert to iso-format, save as .ott in the templates folder. On opening it reverts always to US format.

Please describe how you convert the date field to iso-format.

How can I fix the date format as I wish it to be? This does not appear to be a question of the regional settings, since I have a custom setting including the iso-format for the date.

Did you set your custom setting in /System Preferences/Language & Text/Formats/Dates ?

I have a MacBook using OS X version 10.6.6 . I have no problem saving a template with the date field set the way I desired (I tried saving in different formats, all worked). I am trying to get an idea why it doesn't work for you.

Larry

Thanks Larry.

Open a document, format it as I wanted, insert the date field, convert to iso-format, save as .ott in the templates folder. On opening it reverts always to US format.

Please describe how you convert the date field to iso-format.

Mark the field showing 3/11/11 (the whole field), choose Edit/Fields/ and select the iso-format.

How can I fix the date format as I wish it to be? This does not appear to be a question of the regional settings, since I have a custom setting including the iso-format for the date.

Did you set your custom setting in /System Preferences/Language & Text/Formats/Dates ?

I have a MacBook using OS X version 10.6.6 . I have no problem saving a template with the date field set the way I desired (I tried saving in different formats, all worked). I am trying to get an idea why it doesn't work for you.

It's a mystery to me, too.

//James

Just sent a copy to Andy Brown who contacted me offline. He opens a document with my template and sees the date in iso-format. so it's something local. I have a Macbook and a Mac Mini, both running the same OS and the same version of LibO, and both give me the same problem. I had/have the same problem with OOo, too, and this template, and always have.

//James

Try creating a new profile. Rename your current one and LibreOffice will automatically create a new one. You will need to create a new template with date insert to test. If problem persists, go back to your old profile – delete the new one and change name on old profile back to original.

If the problem is solved you can then copy personal data, extensions, templates etc. bit by bit to determine if any of them causes problems.

Profile is located at:
/Users/<username>/Library/Application Support/LibreOffice

For more information on profiles see the following (it is for OOo, but the basics are the same. Just change path names to LibreOffice):
http://user.services.openoffice.org/en/forum/viewtopic.php?f=74&t=12426

Larry

Found it. Thanks Larry. The error lies somewhere in the file called registrymodifications.xcu. I now have my original profile back, with all the goodies, and I've merely moved in the .xcu file created with my new profile, and now my template gives me the date format in the iso-format.

Now it would be nice to know what line in that file is causing the problem, as the new one is 106 KB, and the old one, the faulty one, is 229 KB, which means that a lot of my registry modifications are missing.

I'll take a look and see if I can find out what is wrong, and test again or come back for more help.

Thanks again.

//James

Hi James

The following solution might be of interest if you want to permanently change
all LibreOffice's behaviour to use the ISO date format.

So I did the following (LibreOffice 3.3.2, on Windows XP):
** In a hex-editor (HxD for example), I opened "C:\Program Files\LibreOffice
3\program\localedata_en.dll". (DLL version 3.03.202)
** PS: Make a backup of this file before you try this!
** At offset "BB44" I found the following unicode string: "MM/DD/YY" - you might
find this string at some other offset...
** I changed it (unicode!) to "YYYY/MM/DD" - which I wanted.
** (PS: make sure you stay consistent with the "00" filler bytes that unicode
strings require for this to work)

This worked for me :smiley: - even files that were created before this modification
now showed their dates in the "yyyy/mm/dd" format. :sunglasses:

Final thought: It would be nice if the developers added an option "Don't use
locales" or a "NoLanguage" language option - this would make this sort of
workaround unnecessary.

Thanks, Xwolf. In my case the problem proved to be a corrupt configuration file. Unfortunately the config file is not what I would call user friendly, so just which bit of it was corrupt I'm not able to say. I simply renamed it and the system created a new one for me. Haven't noticed anything else that had altered.

//James

________________________________
From: James Wilde <james.wilde@sunde-wilde.com>
To: users@libreoffice.org
Sent: Tue, 3 May, 2011 9:52:38
Subject: Re: [libreoffice-users] Re: Date format in template

On Apr 30, 2011, at 13:25 , xwolf wrote:

Hi James

The following solution might be of interest if you want to permanently change
all LibreOffice's behaviour to use the ISO date format.

So I did the following (LibreOffice 3.3.2, on Windows XP):
** In a hex-editor (HxD for example), I opened "C:\Program Files\LibreOffice
3\program\localedata_en.dll". (DLL version 3.03.202)
** PS: Make a backup of this file before you try this!
** At offset "BB44" I found the following unicode string: "MM/DD/YY" - you
might
find this string at some other offset...
** I changed it (unicode!) to "YYYY/MM/DD" - which I wanted.
** (PS: make sure you stay consistent with the "00" filler bytes that unicode
strings require for this to work)

This worked for me :smiley: - even files that were created before this modification
now showed their dates in the "yyyy/mm/dd" format. :sunglasses:

Final thought: It would be nice if the developers added an option "Don't use
locales" or a "NoLanguage" language option - this would make this sort of
workaround unnecessary.

Thanks, Xwolf. In my case the problem proved to be a corrupt configuration
file. Unfortunately the config file is not what I would call user friendly, so
just which bit of it was corrupt I'm not able to say. I simply renamed it and
the system created a new one for me. Haven't noticed anything else that had
altered.

//James

Hi :slight_smile:
Perhaps you can use LibreOffice to compare changes between the 2 files, if they
are text-files, and maybe get some of you old configurations back using that?
Regards from
Tom :slight_smile: