Excel Date Formats: Solving Ambiguity Problems

  • Thread starter Thread starter nomadreid
  • Start date Start date
  • Tags Tags
    Excel
Click For Summary

Discussion Overview

The discussion revolves around the challenges of formatting dates in Excel, particularly the ambiguity that arises from different regional settings and how they affect date interpretation. Participants explore various approaches to ensure that dates are displayed correctly in the desired format (dd/mm/yyyy) while addressing potential issues when sharing spreadsheets with users from different locales.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Exploratory

Main Points Raised

  • Some participants describe how Excel's date formatting is influenced by the user's locale settings, leading to unexpected conversions (e.g., 3/4/2019 being interpreted as 04/03/2019 instead of 03 April 2019).
  • There are suggestions to explicitly set the cell format to dd/mm/yyyy or mm/dd/yyyy to avoid confusion, but participants note that this may not always work as expected.
  • One participant reports an experiment where changing a date from 23/05/2019 to 11/05/2019 resulted in Excel switching the format to 05/11/2019, raising questions about how to override this behavior.
  • Another participant mentions that Excel's internal date storage and display settings can lead to inconsistencies, especially when different formats are used across various systems.
  • Some participants express frustration with Excel's "helpful" features that may not align with user preferences, suggesting that a menu for personal preferences could be overwhelming.
  • There are discussions about using alternative formats (like d mmm yyyy or yyyy-mm-dd) to avoid ambiguity, and one participant suggests using separate cells for day, month, and year to ensure clarity.
  • A participant mentions a workaround using the =TEXT function to maintain the desired format regardless of locale settings.

Areas of Agreement / Disagreement

Participants generally agree on the challenges posed by Excel's date formatting and the influence of locale settings, but there is no consensus on a single solution that works for all scenarios. Various approaches are proposed, but each has its limitations and may not satisfy all users.

Contextual Notes

Limitations include the dependence on user settings and the potential for different interpretations of date formats when sharing files across different regional settings. Some participants note that certain formats may lead to confusion or errors when linked to other spreadsheets.

nomadreid
Gold Member
Messages
1,773
Reaction score
256
TL;DR
I want my dates to appear in the format dd/mm/yyyy, so I set the cell to Category: Date, Type: English (United Kingdom). I type in 3/4/2019 (3 April 2019), and Excel converts it to 04/03/2019. What is going on?
The summary is complete to describe the problem, but to forestall the solution to either (a) leave the Category : "number" and just type what I want, or (b) put the Type as "English(United States)" and type 3/4/2019, I mention why these solutions would create difficulties: a person to whom I will send the spreadsheet will then link the cells to another spread sheet in order to determine data for that day, and an ambiguity would cause problems.
 
Computer science news on Phys.org
nomadreid said:
Summary:: I want my dates to appear in the format dd/mm/yyyy, so I set the cell to Category: Date, Type: English (United Kingdom). I type in 3/4/2019 (3 April 2019), and Excel converts it to 04/03/2019. What is going on?

The summary is complete to describe the problem, but to forestall the solution to either (a) leave the Category : "number" and just type what I want, or (b) put the Type as "English(United States)" and type 3/4/2019, I mention why these solutions would create difficulties: a person to whom I will send the spreadsheet will then link the cells to another spread sheet in order to determine data for that day, and an ambiguity would cause problems.
Excel is formatting the date according to the locale. With English (United Kingdom) as the locale, it displays the date in mm/dd/yyyy format. If you change the locale to English(United States), the same date will be displayed in dd/mm/yyyy format.
 
  • Like
  • Informative
Likes   Reactions: phinds and nomadreid
Thanks, Mark44. I can do that, but I am curious: since the British use dd/mm/yyyy in everyday life, and the Americans use mm/dd/yyyy in everyday life, why does Excel switch these?
 
nomadreid said:
why does Excel switch these?
Excel stores the date internally in a universal format. By default it will use the user's "international settings" (essentially the equivalent of a "locale" in Unix-like systems) to display the date to a user in the format he expects. To override this you can explicitly set the format of the cell to dd/mm/yyyy or mm/dd/yyyy using Cells -> Format -> Format Cells -> Number. The options shown under Date that are prefixed with a * are taken from your international settings and may display differently on another PC, the ones that have no * should be the same anywhere so select dd/mm/yyyy (or better still yyyy-mm-dd) if you want everyone to see the same thing.
 
  • Like
Likes   Reactions: nomadreid
Thanks, pbuk.
 
xAh, apparently there is more to it: I tried the following experiment. I chose the language of the country I am in (which uses dd/mm/yyyy), selected a dd/mm/yyyy from the menu choices, and put in 23/05/2019. That works. But then (in the same box, without changing the settings) I changed the "23" to "11" so that I would expect 11/05/2019 (11 May 2019 as desired) but EXCEL automatically switched it to 05/11/2019 (which then reads as 05 November, which I don't want) -- although it did not change my settings. That is, if it can switch it to the American format (since 23 can't be a month, but 11 can), it will. How can I override this?

To compound the weirdness, the date 11 May 2019 stays as I typed in, 11/05/2019, in the field up at the top (where fx appears to the left), but is switched in the cell.
 
Last edited:
I sympathize with the Excel authors. Over the years there have been many "bugs" reported that turn out to be just violations of personal preference. If you think Excel behaves in a non-intuitive way, there's a good chance that other people think it is intuitive.

There is no single answer that makes all people happy. A menu asking you to choose your preference on 300 questions is not welcome either. Perhaps selecting country, is as close as they can get.
 
nomadreid said:
xAh, apparently there is more to it: I tried the following experiment. I chose the language of the country I am in (which uses dd/mm/yyyy), selected a dd/mm/yyyy from the menu choices, and put in 23/05/2019. That works. But then (in the same box, without changing the settings) I changed the "23" to "11" so that I would expect 11/05/2019 (11 May 2019 as desired) but EXCEL automatically switched it to 05/11/2019 (which then reads as 05 November, which I don't want) -- although it did not change my settings. That is, if it can switch it to the American format (since 23 can't be a month, but 11 can), it will. How can I override this?

To compound the weirdness, the date 11 May 2019 stays as I typed in, 11/05/2019, in the field up at the top (where fx appears to the left), but is switched in the cell.
I'm not sure if you can override this behaviour, this is Excel trying to be 'helpful', and it gets even stranger than that: type 5/23 into cells with various different formats. Sometimes it will guess 23 May 2020 and sometimes 1 May 2023!

In practice this is less of a problem - always use an unambiguous display format (I use either d mmm yyyy or yyyy-mm-dd), and if you are relying on user input that may not be checked, use separate cells for day, month and year and combine them in a formula.
 
  • Like
Likes   Reactions: nomadreid and anorlunda
Thanks for the interesting suggestions, pbuk.

I don't quite see how the d mmm yyyy suggestion would work if d>9, though.

The separate cell idea is one I will use when I rely on user input (not the case that I am dealing with now, but in the future...)

Another alternative that I might end up using is to bow to this "helpful" insidious Americanization, use the imposed format, put a large warning at the beginning of the spread sheet that all dates are of this format, and let the other users handle the hassle when they link with a reference that uses a more standard format. Not ideal, but I may follow the path of least resistance ("Resistance is futile") if I don't find a way to override this "helpful" behaviour. Ugh.
 
  • #10
nomadreid said:
I don't quite see how the d mmm yyyy suggestion would work if d>9, though.
It displays 10 as 10 and 9 as 9 rather than 09 - works for m too, and also h, m and s (with m now meaning minutes - how many problems does that ambiguity cause!)

One final suggestion: if you use =TEXT(a1, "dd/mm/yy") it should ignore any internationaltrickery, you will have to use a separate cell to store the value though.
 
  • Like
Likes   Reactions: nomadreid
  • #11
Thanks for the great suggestions, pbuk, and also thanks for the explanations.

In the meantime I settled on the following solution (but will keep your suggestions in mind for the future, or if my present solution goes "splat" upon arrival): I found that if I select "English (United States)", then it let's me type in whatever I want without interfering (except that it will switch "09/02/2019" to "9/2/2019 -- although it will keep "12/02/2019"as is. The pattern is clear, even though annoying.)

Of course if the receiver were to ask EXCEL to convert it to a format that names which number represents the month, then the wrong result would come out, so I just have to caution the receiver about this if he tries to manipulate the entries. However, merely printed out or viewed on the screen, the spread sheet now shows the desired format (if I am not fussy about zeros).
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 18 ·
Replies
18
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
12
Views
2K
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 18 ·
Replies
18
Views
6K
Replies
4
Views
2K