Change default date format

Discuss the spreadsheet application
Locked
arc riser
Posts: 1
Joined: Tue Oct 06, 2015 8:34 pm

Change default date format

Post by arc riser »

Hi!

I type in a cell "1 Oct" O/Office recognizes it as a date and changes it to "01.10.2015"
I can change date format to for example 01.Oct so next time I type in another cell down in this column "3 Oct" it recognizes it as a date
and changes to "03.Oct"
But I want it to be in format "3 Oct", "7 Oct", "17 Oct" by default without manually reformatting every single cell. And in date format,
not in text format with apostrophe before
If I format a whole column O/Office converts anything ( text, numbers etc. ) in date format but I want numbers being recognized as numbers,
text as text etc AND date as date
Apache Open Office 4.1.1 on Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31365
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: how to change default date format?

Post by Villeroy »

Auto-formatting does not take place. This is a feature.
The cell format is unimportant. Entering the right cell value is much more important.

The easy way on the num pad:
20/ --> this month's 20th day
20/7 --> this year's 20th of July (7/20 in US context)
20/7/13 (US: 7/20/13) or ISO dates like 2013-7-20 enter the correct date of some other year.

Any unformatted cell will show some default format for dates.
Simply format your date cells by means of a dedicated cell styles.
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
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: how to change default date format?

Post by acknak »

Greetings and welcome to the community forum!

Sorry, the only way (that I know of) to change the default format for dates is to change the locale (what country/language you use). Calc selects a date format based on the locale.

The best way to manage data display is to set a specific cell format for cells that contain dates. I'm not sure I understand what makes that a big issue--it only takes a few clicks. If you define a cell style, you can apply that with just a double-click or a keyboard shortcut.
 Edit: Oops--I just missed Villeroy's post. 
AOO4/LO5 • Linux • Fedora 23
User avatar
Lupp
Volunteer
Posts: 3761
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: how to change default date format?

Post by Lupp »

(Off topic?)

The questioner will not be satisfied with the answers above. He (f/m) will not be with mine, I am afraid.

Despite the fact that OpenOffice comes with more than 100 predefined locales, and the "l10n" updating seems to be one of the main concerns in version maintenance/enhancement (at least for the Libre branch), he will hopefully never find a locale using his preferred format by default. It is bad enough that he actually got "1 Oct" recognised(?) as a date at all. As far as I can see he will only get it if working in "English (UK)" locale or a very similar one. "English (USA)" will not do the trick! (Yes, I again used up some time to test this despite the fact that I'm using only the "German (Germany)" locale on a regular basis. It's a mess.)

Other users of this forum will find this thread (and some of the many others related to the field) having a similar question just to find out that things reported here are not valid for them. What an incredible waste of time!

The next point: Do we correctly regard the huge gap between "recognition patterns" and "default formats"? The AOO help (English (UK)) doesn't even mention one of the terms "recognition" or "recognise" (LibO help does meanwhile because for quite some time now a user may edit 'Date recognition patterns' there in a crude way.)

Should we request a feature to the effect that and editor for creating and maintaining something like individual "sublocales" be created? Should such "locales" be applicable on a per_documen/per_sheet/per_document_type ... basis?

No! We should learn to respect international standards in their extreme value - and actually use them instead of only paying (taxes) for the organisations concerned with them.

The only date format explicitly specified to also work as a locale independent recognition pattern is "YYYY-MM-DD". There may be reasons to want a quicker way for entering dates via the keyboard (a more sloppy recognition pattern like "Y-M-D" e.g. or better "M-D" only for thr current year). We dare, however, not ignore the needs of those expecting the exactly same patterns to not be recognised as anything numerical, or as something numerical but not a date. Finally I cannot find an acceptable rationale for also using another format (but ISO8601 conform) for display by default. Oh, sorry, I missed to well appreciate the funny misunderstandings we are accustomed to.

The stubborn ones should, please, be willing to pay a bit for their stubbornness and to define and apply their styles as wanted. They should, please, not force the abominable effects of silly software smartness upon others. I, at least, was willing to spend the time needed to express these thoughts.
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
Villeroy
Volunteer
Posts: 31365
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: how to change default date format?

Post by Villeroy »

LibreOffice messed up completely. Their user base does not even notice the problem and my bug report has been marked invalid. https://bugs.documentfoundation.org/sho ... i?id=94727
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
mxdog
Posts: 17
Joined: Sat Nov 23, 2019 9:22 pm

Re: How to change default date format?

Post by mxdog »

This is old but i ran across it basically asking the same question.

No one wants a locale change or anything else complicated like that, just a check mark in the format page to make the view as system default would be nice ...for instance i just had to manually edit 20 csv files for a database input and literally every time i had to select column ...format cells select date from 01/01/2021 to 1999-01-01 every other spreadsheet in the world can deal with date formatting and set a default "VIEW" of them why not open office calc ? ...and I believe that was the original question. so to answer the original question there does not seem to be a way to globally change the default date view in calc . It seems to me that even if it took an edit a default file to do it there should be a way to do it ? I would prefer YYYY-MM-DD as the default for the usa locale now days the old one is getting pretty rare in data circles,not so much day to day business use ..
OpenOffice 4.1.5
User avatar
Villeroy
Volunteer
Posts: 31365
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to change default date format?

Post by Villeroy »

A cell has exactly ONE number format. Number format "Default" (or "Standard" in German context) displays date input in one particular date format, time input in one particular time format, currency input in one particular currency format etc. There is not way to format these sub-formats of "Default". If you can not accept the default then override it. If you want to format your cells any way you want AND in the most convenient ways, you should learn how to use an office suite. All office suites of the 90ies are about templates and styles.
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
mxdog
Posts: 17
Joined: Sat Nov 23, 2019 9:22 pm

Re: How to change default date format?

Post by mxdog »

I did run across a post that got me going for new cells even though I still have to type them in in the old format ..does me no good for imports but oh well any improvement is good .

https://www.linuxquestions.org/question ... rg-667604/

....to change the default template not perfect but i think it would have helped solve the original question .
OpenOffice 4.1.5
User avatar
Villeroy
Volunteer
Posts: 31365
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to change default date format?

Post by Villeroy »

INPUT
100% of all spreadsheets on the market recognize some input as a date when you type certain variations of digits, separator(s) and month names. If your keyboard input matches a certain pattern then the program writes a NUMBER into a cell and formats it as a date (ALL dates in 100% of all spreadsheets are day numbers).
You drop the term "IMPORT". Calc can import almost every thinkable date format correctly, either from clipboard or from text files.
It is possible to import some text representing a US American date "31/12/1999" as the correct value 31.12.1999 into your (German) spreadsheet.

OUTPUT
This is one "issue" users have to cope with since several decades no matter if they use Calc, Excel, Lotus, Gnumeric, Numbers or any other spreadsheet on the market.
Once you have some kind of number in your cell (date or anything else) you can apply some output format which determines how the NUMBER is displayed. Number 40000 can be displayed as
40000
40.000
40,000
40.000,00€
$40,000.00
TRUE
4.00E+4
2009-07-06 (day #40000 since day zero)
Montag, den 6. Juli 2009
Mo 07/06/09
and thousands of different ways. All the above expressions represent exact the same cell value 40000.
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
Locked