KutoolsforOffice — One Suite. Five Tools. Get More Done.

How to convert numbers to year/month/day or date in Excel?

AuthorKellyLast modified

We can easily count the days between two dates in Excel, but how to display the number of days as year/month/day, such as "1 year 4 months 25days"? And what if converting a number yyyymmdd to a normal date? This article is talking about converting numbers to year/month/day or dates in Excel.

FeatureFormulaKutools Formula HelperExcel Short DateKutools Apply Date FormattingKutools Convert to Date
Best forConverting a number of days into years, months, and daysConverting days to years/months/days without memorizing formulasQuickly displaying Excel serial numbers as datesConverting serial numbers with a chosen date formatConverting yyyymmdd numbers such as 20151215 to dates
OutputText such as 1 year 4 months 25 daysText such as 1 year 4 months 25 daysStandard Excel dateDate in a selected formatStandard Excel date
Main advantageBuilt into Excel and flexibleEasier than memorizing a DATEDIF formulaFast and built into ExcelProvides multiple date-format choicesOne-click conversion for yyyymmdd numbers
Recommended useWhen you need formula-based year/month/day resultsWhen you frequently convert day countsWhen 5-digit values are already Excel date serial numbersWhen you want a specific date appearanceWhen imported data contains numbers in YYYYMMDD format

Convert numbers (days) to year/month/day

This method will introduce a formula to convert the number of days to year/month/day such as "1 year 4 months 25days" in Excel. Please do as follows:

1. Select a blank cell you will output the conversion result, and enter the following formula into it, and press the Enter key.

=DATEDIF(0,A2,"y")&" years " &DATEDIF(0,A2,"ym")&" months "&DATEDIF(0,A2,"md")&" days"

Convert numbers to year/month/day with formula

Note: A2 is the cell with number of days that you will convert to year/month/day.

2. Keep selecting the cell of conversion result, and drag its Fill Handle to the range as you need. And then you will see all numbers are converted to year/month/day. See screenshot:
drag and fill the formula to other cells

Convert numbers (days) to year/month/day with an amazing tool

Some users may feel hard to memorize formulas to convert the number of days to year/month/days in Excel. Here I recommend the Formula Helper of Kutools for Excel to quickly finish the conversation without memorizing the painful formulas.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Integrated with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Select the cell you will put the calculation result at, and click Kutools > Formula Helper > Formula Helper to enable the feature.

2. In the Formulas Helper dialog, please select Date from the Formula Type drop-down list, click to highlight Convert days to year month day in the Choose a formula list box, then specify the number cell in the Number box, and finally click the Ok button.
set options in the Formulas Helper dialog

Now the calculation result is output in the selected cell. If necessary, you can drag the AutoFill Handle of this cell to copy this formula to other cells.
ge the result by kutools

Convert general numbers to date of default date formatting

Sometimes, you type or paste dates into Excel, but the dates show as 5-digits of general numbers. In this case, you can easily convert 5-digits of general numbers to dates with following methods:

Select the 5-digits numbers, and click Home > Number Format box > Short Date. And then you will see all selected 5-digits numbers are converted to dates with default date formatting at once.
 click Short Date from Home tab to format the numbers to date


Convert general numbers to date with custom date formatting

Kutools for Excel's Apply Date Formatting utility can help you quickly convert 5-digits numbers to dates with custom date formatting.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Integrated with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Select the 5-digits of numbers, and click Kutools > Format > Apply Date Formatting.
click Apply Date Formatting feature of kutools

2. In the opening Apply Date Formatting dialog box, select the specified date formatting you will use in the Date formatting box, and click the Ok button. And then you will see all numbers are converted to dates with specified date formatting. See screenshot:
set options in the dialog and get the result


One click to convert number yyyymmdd to date

Sometimes, you may get some special numbers of yyyymmdd, such as 20151215. This section will show you an easy way with one click to convert these numbers of yyyymmdd to normal dates by the Convert to Date utility of Kutools for Excel.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Integrated with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

Select the cells with special numbers of yyyymmdd, and click Kutools > Content > Convert to Date. See screenshot:
click Convert to Date feature of kutools

And then you will see all selected numbers are concerted to normal dates. See screenshot:
all selected numbers are concerted to normal dates by kutools
Please click the Close button to close the Convert to Date dialog box.


Conclusion

Excel can handle several types of numeric date data, but the best conversion method depends on what the number actually represents.

Use a formula or Kutools Formula Helper when you need to convert a number of days into years, months, and days. If the values are already Excel date serial numbers, Short Date or Kutools Apply Date Formatting can display them as readable dates. For numbers stored in YYYYMMDD format, Kutools Convert to Date provides a quick way to convert them into standard Excel dates.

Tip: Before converting, first identify whether your values are day counts, Excel date serial numbers, or date strings such as YYYYMMDD. Choosing the correct method will help avoid incorrect results.

In short, Excel’s built-in tools work well for standard cases, while Kutools for Excel can simplify repeated conversions and provide more convenient formatting options.


Related articles:

Best Office Productivity Tools

🤖Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |  Round without Formula ...
Super Lookup: Multiple Criteria VLookup  |   Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |  Big Formula Bar   |  Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells   |  Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

ExcelWordOutlookTabsPowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in