OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Default Date format

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
Korak
OOo Enthusiast
OOo Enthusiast


Joined: 25 Sep 2004
Posts: 116

PostPosted: Mon Oct 25, 2010 9:34 am    Post subject: Default Date format Reply with quote

I have went in and changed the default date to mm/dd/yyyy, saved it as a template and then made that template my default.

If I open a new spreadsheet up and type dates, then I am fine.

On the other hand, I have a program that exports to a comma delimited file. The file is fine when I look at the dates with a word processor.

i.e. they are in format mm/dd/yyyy

When I open up the file with calc though, it converts all dates to mm/dd/yy. Any idea why it is doing this and how do I get it to hold the default date format without having to manually change it when I get it open?

Thanks.
Scott
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Mon Oct 25, 2010 9:58 am    Post subject: Reply with quote

Simply change your locale setting to US English and MM/DD/YY will be an US date in all situations in all applications, table cells, form controls, text fields unless you specify another locale for the respective object.
Tools>Options...LangSettings>Locale=English(USA)

12/31/10 can be the exact same value as 31/12/10, 2010-12-31 or any other formatting in any other number format locale.
In the end it is number 40543 when you format the exact same value as integer number.
Don't waste your time with formatting games. The number format you see is completely unimportant as long as you import the correct values.

Apart from that, a spreadsheet application is the worst type of program to fiddle with database data in plain text.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Korak
OOo Enthusiast
OOo Enthusiast


Joined: 25 Sep 2004
Posts: 116

PostPosted: Mon Oct 25, 2010 11:08 am    Post subject: Reply with quote

I know in the end it is the same for OO, but here is the problem. (btw, I changed the local setting and still get the same thing).

We have multiple files that are downloaded with dates in format mm/dd/yyyy. The sheets are combined and then when saved back in comma delimited form, the dates are saved in mm/dd/yy. When they are uploaded to the state department, we get errors that the date is in the wrong format.

We can go through and format them as mm/dd/yyyy, but I was hoping we could do this automatically so the secretary would not have to. The worst part is that Excel opens them and saves them as should be.

Scott
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Mon Oct 25, 2010 11:12 am    Post subject: Reply with quote

You have 3 options at least:
1. apply US application locale during import. Once you've go the right values you can switch back to any locale.
2. In the import wizard you can tag the respective column as Date(MDY). Just click the column header in the preview.
3. Next version 3.3 (I'm running the beta release right now) has an extra option where you specify the assumed locale for all the text columns.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Korak
OOo Enthusiast
OOo Enthusiast


Joined: 25 Sep 2004
Posts: 116

PostPosted: Mon Oct 25, 2010 11:45 am    Post subject: Reply with quote

Villeroy wrote:
You have 3 options at least:
1. apply US application locale during import. Once you've go the right values you can switch back to any locale.


Not sure what you mean here. I right clicked the .txt file and selected to open with Calc and tried changing the character set to a couple of different ones, but it did not work. It still shows and saves in the mm/dd/yy format.

Villeroy wrote:
2. In the import wizard you can tag the respective column as Date(MDY). Just click the column header in the preview.


I rlght clicked the text file and opened with calc and tried this also and it still shows and saves as mm/dd/yy

I'll do some more playing with it and see what I can come up with.

Thanks for the help.
Scott
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Mon Oct 25, 2010 1:08 pm    Post subject: Reply with quote

http://user.services.openoffice.org/en/forum/viewtopic.php?f=9&t=22514&p=103009&hilit=import+text+screenshot#p103009
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group