+ Reply to Thread
Results 1 to 4 of 4

How do I convert years into months and days?

Hybrid View

  1. #1
    Registered User
    Join Date
    10-23-2012
    Location
    Portland, OR
    MS-Off Ver
    Microsoft 365
    Posts
    50

    How do I convert years into months and days?

    Hello!

    I'm trying to figure out how to convert something, say from 1 year, 6 months and 12 days to read as 18 months and 12 days. The formula I'm currently working with is:

    DATEDIF(D7966,E7966,"y")&" years "&DATEDIF(D7966,E7966,"ym")&" months "&DATEDIF(D7966,E7966,"md")&" days"

    but I don't know how to remove the year portion without it just not including it.

    Any input is greatly appreciated!!

    Thanks in advance!!!!!!

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: How do I convert years into months and days?

    maybe
    DATEDIF(D7966,E7966,"y")*12+DATEDIF(D7966,E7966,"ym")&" months "&DATEDIF(D7966,E7966,"md")&" days"

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: How do I convert years into months and days?

    Formula: copy to clipboard
    =DATEDIF(D7966,E7966,"m")&" months "&DATEDIF(D7966,E7966,"md")&" days"


    reading on the function itself
    https://exceljet.net/excel-functions...tedif-function
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    10-23-2012
    Location
    Portland, OR
    MS-Off Ver
    Microsoft 365
    Posts
    50

    Re: How do I convert years into months and days?

    Quote Originally Posted by humdingaling View Post
    Formula: copy to clipboard
    =DATEDIF(D7966,E7966,"m")&" months "&DATEDIF(D7966,E7966,"md")&" days"


    reading on the function itself
    https://exceljet.net/excel-functions...tedif-function
    100% correct. Just removing the "Y" portion of the formula gives just the month count. That link was great! Thank you so much!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Convert number to years, months and days
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-14-2015, 01:47 PM
  2. How do I convert years, months, days back to complete days
    By Nisha Dhawan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-13-2014, 03:21 AM
  3. [SOLVED] convert Days to Years, Months, Days
    By Klaudebou in forum Excel General
    Replies: 4
    Last Post: 08-24-2014, 02:22 PM
  4. [SOLVED] Convert days into years/months/days
    By JennOlsen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-27-2014, 02:16 PM
  5. Convert days -> Years, Months, Days, Hours, Minutes, Seconds
    By brharrii in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-06-2012, 06:44 PM
  6. Convert Years to Years/Months/Days
    By coreymartin@gmail.com in forum Excel General
    Replies: 4
    Last Post: 01-04-2006, 11:00 AM
  7. [SOLVED] how do I convert a number to number of years, months and days
    By because in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2005, 02:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1