Skip to content
86% off$349 $48.86code BF2026

Guides

Excel Unix timestamp shows yyyy-44-07 hh:44:01: locale fix

Excel's TEXT() printed yyyy-44-07 hh:44:01 because format codes follow your language. Fix it with local codes, cell formatting or an outside conversion.

TroubleshootingUpdated 6 min read

On this page

You typed =TEXT(E2/86400000+25569;"yyyy-mm-dd hh:mm:ss") and got this instead of a date:

text
yyyy-44-07 hh:44:01

The same formula reportedly worked on a French Mac and in Google Sheets. It failed on a Mac that was described as English.

Why the formula prints yyyy-44-07 hh:44:01

Excel reads the letters in a TEXT format string according to its own language and region settings. People on Microsoft's community Q&A pages say the same: format codes work only with your locale language. A German-language Excel user there found that it expected DDDD where he had always typed the German TTTT, so this goes both ways.

Your output shows which letters were recognized:

  • yyyy and hh came out as literal text, so your Excel doesn't use y and h for year and hour.
  • dd and ss became 07 and 01, so those letters were recognized.
  • Both mm became 44. A month can't be 44, so Excel read them as minutes. In the fix reported in the original thread, ÅÅÅÅ-MM-DD tt:mm:ss, the month is uppercase MM and the minutes are lowercase mm. Those letters are from a Nordic-language Excel.

Your formula also uses ; between arguments. That is the separator in many non-English regional settings, so your Excel is probably not running with English region settings, even if macOS menus are in English. I can't tell your exact language from the output alone. To check, open System Settings, search for "Region", and compare it with the language Excel is set to.

The conversion is fine. 86,400,000 is the number of milliseconds in a day, and 25569 is the Excel date number for 1970-01-01. For example, 1719400000123 gives about 45469.463, which is 2024-06-26 11:06:40 UTC.

Step-by-step fixes

Fix 1: Format the cell instead of using TEXT

This avoids typed format codes entirely and works in every language.

  1. In the result cell, enter =E2/86400000+25569 (use , instead of ; if your Excel needs it, though this formula has no separators).
  2. Select the cell or column and press ⌘1 to open Format Cells.
  3. On the Number tab, choose Date or Time and pick a format from the list.
  4. If you need date and time together and no listed format has both, choose Custom and type the codes in your Excel's language (see Fix 2).

The cell keeps a real date value, so you can sort it and subtract dates. TEXT returns plain text. One reply on Microsoft's community Q&A gives the same advice: use the plain cell reference with any date format you want on that cell.

Fix 2: Use your language's format codes in TEXT

Use TEXT when you need the date inside a longer string. Write the codes the way your Excel reads them:

Excel languageYear-month-day hour:minute:second
Englishyyyy-mm-dd hh:mm:ss
Code set from the original threadÅÅÅÅ-MM-DD tt:mm:ss
Anything elseCopy from Format Cells > Custom

To find your language's letters, select a cell that shows a date, press ⌘1 and open Custom. The box shows the code behind the current format in your Excel's letters. Copy those letters into your TEXT string and keep the month and minute codes distinct.

Fix 3: Build the text from parts

Number-only formats like "00" contain no year, month or hour letters, so they don't depend on language. With the date number in F2 (=E2/86400000+25569):

text
=YEAR(F2)&"-"&TEXT(MONTH(F2),"00")&"-"&TEXT(DAY(F2),"00")&" "&TEXT(HOUR(F2),"00")&":"&TEXT(MINUTE(F2),"00")&":"&TEXT(SECOND(F2),"00")

Function names and argument separators can be localized too. You may need your language's names for YEAR, MONTH and the rest, and ; instead of ,.

Fix 4: Add a language tag to the format

People on Microsoft's community Q&A report that an LCID code in the format makes TEXT output in a specific language, for example [$-409] for US English at the start of the format string. Treat this as something to try, not a guarantee. It reportedly changes the language of the output, such as month names, and may not change which letters Excel accepts as codes. Test it on one cell before applying it to a column.

Fix 5: Convert outside Excel and paste the result

If you only need readable dates once, skip the formula.

Terminal. The macOS date command takes seconds, so divide the milliseconds by 1000 (this drops the last three digits). It only prints text and changes nothing:

bash
date -u -r $((1719400000123/1000)) +"%Y-%m-%d %H:%M:%S"

-r reads a Unix timestamp, -u prints UTC, and the quoted part is the output format. Drop -u for your Mac's local time. This prints 2024-06-26 11:06:40. It handles one value at a time unless you write a loop.

Bytepliers. For a whole column, the Unix Timestamp tool in Bytepliers can do the conversion. It doesn't repair formulas in your sheet. It auto-detects epoch seconds, milliseconds, microseconds and nanoseconds. When you paste several lines it builds a table with Input, Local, ISO 8601 (UTC), Unix and Relative columns, up to 5,000 lines, and you can copy the table as tab-separated values.

  1. In Excel, copy the column of timestamps.
  2. In Bytepliers, press ⌘7 to open Unix Timestamp and paste into the input.
  3. Set Numbers to Unix Milliseconds if you don't want to rely on Auto (Unix).
  4. Copy the table and paste it into a new sheet.

The Numbers picker also has an Excel Serial Date reading. Paste a value like 45469.463 to check which date your formula's result stands for. Bytepliers is part of MacSuite, with a 7-day free trial. Other methods are in how to convert a Unix timestamp on Mac.

Other reasons the result is still wrong

SymptomCauseFix
Excel rejects the formulaArgument separator follows your regionSwap ; and ,
Date near 1970 or far in the futureWrong divisor13 digits = ms, divide by 86,400,000; 10 digits = seconds, divide by 86,400
Time is off by hoursThe formula gives UTCAdd your offset divided by 24, such as +2/24
Dates about 4 years offWorkbook uses the 1904 date systemUse 24107 instead of 25569
Cell shows 45469.463General number formatApply a date or time format (Fix 1)
Formula errors on the source cellTimestamp stored as textWrap it in VALUE(E2) or convert the column to numbers

Checklist before you try again

  • The cell holds a number, not text.
  • You divided by 86,400,000 for milliseconds (13 digits).
  • Argument separators match your region (; or ,).
  • Format letters match your Excel's language, or you used cell formatting.
  • The result cell isn't set to a number format that hides the date.

If nothing works

If a built-in date format from Format Cells shows the wrong date for a timestamp you know, format codes are not the cause. Contact Microsoft Support. Include your Excel version, the Mac's language and region settings, the raw cell value, the date you expected and the formula you used.

text
Subject: Excel TEXT() date format returns literal letters

Excel version: (your version)
macOS language/region: (your settings)
Formula: =TEXT(E2/86400000+25569;"yyyy-mm-dd hh:mm:ss")
Raw value in E2: 1719400000123
Result: yyyy-44-07 hh:44:01
Expected: 2024-06-26 11:06:40 (UTC)
Tried: cell formatting via Format Cells, local-language format codes

Common questions

Why does it work in Google Sheets?

Google Sheets accepts the English format letters regardless of your language. Excel on your Mac reads them in the language of its own settings, so the same string behaves differently.

Is the 25569 offset always right?

It is right for Excel's default 1900 date system, where 25569 is 1970-01-01. Workbooks that use the 1904 date system need 24107.

Can I change Excel's language to fix this?

Often, yes. People report fixing similar problems by changing the language and region settings, but that changes every date and number display in the workbook. Using cell formatting or an outside conversion is less disruptive.

Why does my Mac say English but Excel acts like another language?

Excel can follow a separate language and region setting from the system menus. Check both. A formula with ; separators is a hint that the region is set to one that uses them.

Every app.
One purchase.