• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

How To Calculate Year, Month and Day In A Given Number

How To Calculate Year, Month and Day In A Given Number

Let me show you how to convert the number of days to year/month/day in the prescribed format “1 year 4 months 25days” in Excel.

Convert number of Days to year/month/day format

For this, we need to use the DATEDIF function.

Syntax for DATEDIF Function:

DATEDIF(start_date,end_date,unit)

First of all select a blank cell you where we want the output of the conversion.

Type the formula as shown below:

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

Here A2 is the cell containing number of days.

See the image below:

convert-date-4

Press Enter and excel will generate the result.

Just double click the fill handle and it will automatically copy the same formula for the range. And then you will see all numbers are converted to year/month/day.

See image below:

convert-date

Filed Under: Microsoft Excel

You are Here: Home / Basic Excel Functions / How To Calculate Year, Month and Day In A Given Number

About Shabbir Bhimani

I have worked in Excel and like to share functional excel templates at ExcelDataPro.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

ExcelDataPro

Free Excel Pro Templates

  • Glossary
    • Accounting Glossary
    • HR & Payroll Glossary
    • Tax Glossary
  • Templates
    • Accounting
      • Financial Analysis
      • Financial Statement
    • Educational
    • Taxation
      • Federal Income Tax
      • GST
      • UAE VAT
      • UK VAT
    • Human Resources
      • HR & Payroll
      • HR Metrics
    • School Management
    • Social Media
    • Sales-Marketing
    • Personal Finance
    • Other
      • Health & Fitness
  • Functions
  • Calculators
  • Home
  • Contact
  • Privacy
  • Terms

© ExcelDataPro 2025. Content Licensed Under Creative Commons with Attribution Required

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT