日付が数字になってしまうとき
- 選ぶ
- 確かめる
ExcelをCSVに変換したら、日付が「45,000」のような数字になっていた。そんなときの原因と対処です。ExcelをCSV・JSONに変換する の日付の扱いを、説明します。
手順
- 「.xlsx のExcelファイルを1つ選びます」で、ファイルを選びます。
- 「シート」と「形式」を選びます。
- 「変換後」で、日付の列を確認します。
なぜ数字になるのか
Excelは、日付を「シリアル値」という数字で保存しています。たとえば、2026年10月21日は、ある決まった数字です。セルの「表示形式」が日付になっているときだけ、日付として表示されます。
日付で出力されるセル
Excelで、セルの表示形式が「日付」になっているセルは、「2026-10-21」の形になります。
数字のまま出てしまうセル
- 表示形式が「標準」や「数値」のまま、日付の数字が入っている
- 文字列として入力された日付(「2026/10/21」を文字として入力)は、そのまま文字で出る
直し方
- Excelで、日付の列を選ぶ。
- 「セルの書式設定」で、表示形式を「日付」にする。
- 保存し直す。
- もう一度、このツールで変換する。
日付の形式
変換後の日付は、「年-月-日」の形になります。別の形式にしたい場合は、変換後に、Excelなどで書式を変えます。
時刻を含むセル
日付と時刻を含むセルは、時刻の部分も含めて出力される場合があります。必要に応じて、確認してください。
向いている対処
日付が数字で出てきたとき、後から変換するより、Excel側の表示形式を直して、再度変換するほうが、確実です。
例
受注日の列が、「46,317」のような数字で出力された。Excelで、列の表示形式を「日付」に直して保存し直し、再度変換したところ、「2026-10-21」の形で出力された。
つまずきやすい点
- 一部のセルだけ数字:その行のセルだけ、表示形式が違う。
- 和暦の表示:出力は西暦。
- 空のセル:空のまま出力される。
よくある質問
数字を日付に戻すには?
Excelで、数字のセルの表示形式を、日付に変えます。
まとめ
日付が数字になるのは、表示形式が日付でないため。Excelで直して、再変換しましょう。
ExcelをCSV・JSONに変換するを使う(無料)あわせて使えるツール
- CSVをExcelファイルにする:CSVを、Excelで開ける .xlsx ファイルにします。
- CSVとJSONを相互変換する:CSVとJSONを、すぐに相互変換します。
- Wordから文字を取り出す:Wordファイルの本文を、文字だけで取り出します。
同じツールの、ほかの解説
When Dates Show as Numbers
- Choose
- Check
Converting Excel to CSV turned dates into numbers like "45,000". Here are the cause and remedy. How Convert Excel to CSV or JSON handles dates is explained.
Steps
- With "Choose one .xlsx Excel file", choose the file.
- Choose the "Sheet" and "Format".
- Check the date column in "After conversion".
Why they become numbers
Excel stores dates as numbers called "serial values". For example, 21 October 2026 is a certain fixed number. It is displayed as a date only when the cell's "display format" is date.
Cells output as dates
Cells whose display format is "Date" in Excel come out in the form "2026-10-21".
Cells that come out as numbers
- Date numbers entered in a cell whose display format remains "General" or "Number"
- Dates typed as text (typing "2026/10/21" as a string) come out as text as they are
How to fix
- In Excel, select the date column.
- In "Format Cells", set the display format to "Date".
- Save again.
- Convert again with this tool.
Date format
Converted dates are in the form "year-month-day". If you want another format, change the format in Excel or similar after conversion.
Cells with time
Cells containing both date and time may be output including the time part. Check as needed.
A useful approach
When dates come out as numbers, fixing the display format in Excel and converting again is more reliable than correcting afterwards.
Example
The order date column was output as numbers like "46,317". After fixing the column's display format to "Date" in Excel, saving again and converting again, it came out as "2026-10-21".
Common stumbling blocks
- Only some cells are numbers: only those rows' cells have a different display format.
- Japanese era display: the output is in Western calendar years.
- Empty cells: output as empty.
Frequently asked questions
How do I turn numbers back into dates?
In Excel, change the number cells' display format to date.
Summary
Dates become numbers because the display format isn't date. Fix it in Excel and convert again.
Use "Convert Excel to CSV or JSON" (free)Tools that go well with this
- Convert CSV to Excel (.xlsx): Convert a CSV to an Excel (.xlsx) file.
- Convert CSV and JSON: Convert between CSV and JSON instantly.
- Extract Text from a Word File: Extract the plain text from a Word file.