You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Numbers: Change Date/Time Format on Imported Spreadsheet

Numbers 6.1, MacOS 10.13.6 (High Sierra)


I opened a spreadsheet from a .csv file downloaded from an online database. There is a Date of Birth column that imported dates as text in the US format (mm/dd/yyyy). My system settings are U.K. Custom so that dates show up as dd/mm/yyyy. I want to either tell Numbers either to view the dates in this spreadsheet as mm/dd/yyyy or convert the dates to the dd/mm/yyyy format.


Here's what I've tried so far to no avail:

  • Highlighted the column that contains the Date of Birth and changed the Data format to Date & Time, then changed the Date to "5 Jan 2021". Entries for which the middle number was 12 or less converted to dates, but Numbers assumed that the first number was the Day and the middle number was the Month — i.e. 12/04/2016 converted to 12 Apr 2016 instead of 4 Dec 2016. Any entry for which the middle number was greater than 12 just didn't convert — i.e., 01/26/2016 remained as text.
  • I tried using the Left, Mid, and Right functions to separate out the parts of the date and then Concatenate to combine the numbers in the correct order — i.e., 01/26/2016 separated out to 01, 26, 2016 in separate columns and then recombined them to 26/01/2016. I then tried to change the Data Format in the column with the recombined numbers (i.e., 26/01/2016) to Date & Time and the Date format to 5 Jan 2021 to make it clear whether or not the format has taken. It did not — the Data Format for the new column remained Automatic and the "date" was still text. I even tried changing the Data Format for the separated values to Number, but the recombined cell still remained text.


Is there a way to change an imported spreadsheet containing dates in the mm/dd/yyyy format so that Numbers correctly converts the dates to dd/mm/yyyy?

MacBook Pro 15″, macOS 10.13

Posted on Aug 23, 2021 9:57 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 23, 2021 3:16 PM

Here is one way if this is something you need to do only once in a while:


  1. Use the menu item File/Advanced/Language & Region and change the region to English/US.
  2. Select the column of dates and format those cells as Date&Time.
  3. Change the region back to your system settings, probably System-English / United Kingdom
  4. The dates will be correct now but the format will still be the US format. Select them again and change the format to DD/MM/YYYY


If you want to do it with formulas instead and if your dates are in column A in US mm/dd/yyyy format,

TEXTBEFORE(A, "/") is the month

TEXTBETWEEN(A,"/","/") is the day

TEXTAFTER(A,"/",2) is the year

DATE(year,month,day) will turn those three things into a date.

Similar questions

4 replies
Question marked as Top-ranking reply

Aug 23, 2021 3:16 PM in response to BobKenya

Here is one way if this is something you need to do only once in a while:


  1. Use the menu item File/Advanced/Language & Region and change the region to English/US.
  2. Select the column of dates and format those cells as Date&Time.
  3. Change the region back to your system settings, probably System-English / United Kingdom
  4. The dates will be correct now but the format will still be the US format. Select them again and change the format to DD/MM/YYYY


If you want to do it with formulas instead and if your dates are in column A in US mm/dd/yyyy format,

TEXTBEFORE(A, "/") is the month

TEXTBETWEEN(A,"/","/") is the day

TEXTAFTER(A,"/",2) is the year

DATE(year,month,day) will turn those three things into a date.

Aug 23, 2021 5:42 PM in response to Badunit

Badunit, thank you. Your first option worked and did what I needed. The only problem is a limitation in Numbers' Language & Region options — there was no option to do a custom format (date in the UK format, but currency in US format), but that's not an issue for the particular spreadsheet I'm working with


I tried the formula option, assuming that you literally meant TEXTBEFORE, TEXTBETWEEN, and TEXTAFTER were the functions (though I didn't remember ever seeing them), however, I quickly discovered that they were not recognized as valid functions. Then I did a face palm and realized what I needed to do. This is what I came up with, and it worked:


  • To convert US date format in R2 (mm/dd/yyyy) to yyyy/mm/dd, I used this formula: =DATE(right(R2,4),left(R2,2),mid(R2,4,2))
  • Highlight the resulting column, select "Cell" in the Format table, select Date & Time in the Data Format section, then select the desired date format in the Date drop-down (I selected "None" in the Time drop-down) — I prefer the format, 5 Jan 2021 for clarity across regions.
  • Finally, I copied the contents of the formulae results, then chose Edit—>Paste Formula Results. That way I could delete the original date column and retain the dates and format I desired.


So, thanks for helping me by pointing me in the right direction and letting me figure it out. Excellent pedagogy. (And, I'm dead serious.)

Aug 24, 2021 5:02 AM in response to BobKenya

TEXTBEFORE and the others are newer functions. Your version of Numbers must be from before they were added. They are really handy for the general case where you don't know the position or number of characters to return. If your dates were a mix of date formats (01/05/2021, 1/5/2021, 01/05/21, 1/5/21), your formulas would be much more complex.

Numbers: Change Date/Time Format on Imported Spreadsheet

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.