Written by Allen Wyatt (last updated March 30, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
Dates are a special case in Excel. If you enter information that can be translated as a date (by any stretch of the imagination), then Excel treats it as a date. It converts your data into a serial number that is internally used to represent dates and times. For instance, any of the following entries will be translated to a date by Excel:
If you enter the first example, Excel will convert it to a date and display that date as best it can determine. If you leave off the year in your entry, Excel assumes you mean the current year. You could also use dashes instead of slashes and Excel will still figure out you are entering a date.
Regardless of how you type a date, it is converted to a special serial number by Excel and stored internally in that format. How you see the date on your screen is a consequence of how the cell is formatted. Even though Excel stores dates in a standard format internally, they can be displayed using any number of different formats.
Understanding that Excel will always try to convert an entry into a date if it can—by any stretch of the imagination—be considered a date, you may be tempted to ask how you can stop Excel from doing such conversions. There are only two ways I've been able to come up with:
Either of the first two approaches forces Excel to treat your entry as text, not as a date. The third approach treats the entry as an actual formula, such that Excel would convert =5/22 to 0.22727273, which is 5 divided by 22.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12386) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Entering Dates in Excel.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
Enter information into a cell, and Excel needs to figure out what type of information it is. Here's how Excel interprets ...
Discover MoreThe programs in the Microsoft Office suite are designed to work with each other easily. Sometimes there can be hiccups ...
Discover MoreWe all make mistakes. Fortunately, Excel makes it rather easy to undo your makes, right after you make them.
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2020-12-15 13:56:11
Ken Berger
My previous response I gave the wrong shortcut: It is suppose to be CTL+Colon and I said CTL+Semicolon. How can I correct that in the response.
2020-12-15 13:51:51
Ken Berger
I have run into this in the past and what I do now is use the shortcut for putting in the date (CTL+ Semicolon). Excel enters the date in this format 12/15/2020. Once you exit the cell, excel will update the date to the format you have chosen for that cell or leave it a as entered if there is no date formatting on that cell. This has helped me in a couple of ways: 1) a quick way to enter a date and I know there is suppose to be a date in that cell, 2) if some odd ball number shows up, I can check for a typo in my input.
2020-12-14 13:41:40
Karl Gregg
In my long experience with Excel and the frustration of the software changing what I want to see, I use the following procedure and special character.
Let's say you just want to see these text characters in a cell: Jan 23
My 2016 Excel interprets this as 2020-01-23 (Canadian SI Metric format) in the formula bar and 23-Jan in the cell. Not what I want to see!
In the cell where you want this shortened date form, type: 'Jan 23
From a Google search:
"The lowly Apostrophe will allow entry of any reasonable set of characters as text. It's a bonus!
An apostrophe before a cell value forces Excel to interpret the value as text. This is mostly useful for values that look like a number or date. For example, Dec-1 would ordinarily be converted to a date in December. If you want the literal text Dec-1, enter it as 'Dec-1."
2020-12-14 11:20:17
David Bonin
I have a somewhat different issue...
When importing data into Excel from our MRP system, dates sometimes get imported as text, and sometimes as dates.
Since I never know which I might get, I typically add a "Date as Numeric" column with a formula which checks the imported data value. If it is a number, the new column formula uses that number. If it is text, the formula picks the text apart and reassembles the pieces into a date number.
2018-03-12 13:11:46
Julius
"Understanding that Excel will always try to convert an entry into a date if it can—by any stretch of the imagination—be considered a date, you may be tempted to ask how you can stop Excel from doing such conversions."
* Format the cell as Text before entering a value in the cell.
The above paragraph was useful to resolve a problem I was engaged.
Thank you. I see the paragraph is not included in your July 2017 version of this tip.
2017-05-12 18:36:28
Fred
Barry and Peter, thanks. I'll see if I can get that idea working.
Fred
2017-05-12 05:03:24
I had a similar problem a year or so ago. The basic problem is that Excel isn't recognising the date as a date.
You can use a helper column with a formula that pulls the downloaded date apart and puts it back together as a date that Excel will recognise. Or as I did I created a macro to do this which I run immediately after I do the download (in fact the macro does the download and converts the dates, on a time schedule automatically).
There are other tips on this site that cover formulas to pull dates apart, and put them back together again.
https://excelribbon.tips.net/T009779_Converting_an_Unsupported_Date_Format.html
https://excelribbon.tips.net/T011400_Entering_Dates_without_Separators.html
You'll have to modify the formulas/macros to suit the particular format of your dates.
2017-05-12 03:41:39
peter b
Fred,
Have you thought about using helper cells to process the ""Monday, January 1, 2017" dates?
e.g. the extract the year using right(4)... extract the day of month using mid and finding the 2nd comma.. and use vlookup for converting the text of the month into a number.. and then recombine them all using the date() function.
Peter
2017-05-11 13:23:44
Fred
Peter,
Thanks, but I can't change the format of the data before downloading it (it comes from another company that has little interest in helping its customers... but that's another story).
I'm not sure what you mean by preformatting. I use a web interface to download their data as an Excel file.
And finally, applying the formatting -- any type of date format --to those dates just doesn't work. Which is why I have to go through and manually change Every. Single. Date.
2017-05-11 12:00:28
Peter Atherton
Fred
I don't know about downloading from database but you could try preformatting using the following
dddd, mmmm d, yyyy
If that fails sellect all the dates and apply that formatting.
2017-05-10 11:05:22
Fred
Allen,
I have to download data from a database that has dates written like this: "Monday, January 1, 2017". Even if I tell Excel (2013 and/or 2016) that this column is dates, and even if I tell Excel to format that column of dates exactly the same way (which is indeed one of the pull-down options for formatting dates) Excel still won't recognize those cells as dates. Thus, I have to go through every export and manually reenter all the dates so that Excel will recognize them.
Do you have any ideas how avoid this?
Thanks,
Fred
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2023 Sharon Parq Associates, Inc.
Comments