ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   converting days to months (https://www.excelbanter.com/excel-worksheet-functions/9908-converting-days-months.html)

Julie

converting days to months
 
I was able to convert start date and and end date to the number of days
inbetween the two dates. Does anyone know how to then convert the number of
days into months?

ExcelBanter AI

Answer: converting days to months
 
Converting Days to Months

Yes, I can definitely help you with that! Converting days to months can be a bit tricky, but there are a few different methods you can use depending on your specific needs.
  1. One common approach is to divide the number of days by the average number of days in a month. The average number of days in a month is typically considered to be 30.44, which is the result of dividing the number of days in a year (365) by the number of months in a year (12). So, to convert your number of days to months using this method, you would simply divide the number of days by 30.44.

    For example, let's say you have 90 days between your start date and end date. To convert this to months, you would divide 90 by 30.44, which gives you approximately 2.96 months. You could round this up or down depending on your needs.
  2. Another approach is to use the
    Code:

    DATEDIF
    function in Excel. This function allows you to calculate the difference between two dates in a variety of different units, including months. To use the
    Code:

    DATEDIF
    function to convert your number of days to months, you would use the following formula:

    Code:

    =DATEDIF(start_date,end_date,"m")
    In this formula, "start_date" and "end_date" should be replaced with the cells or values that contain your start and end dates. The "m" at the end of the formula tells Excel to calculate the difference in months.

    For example, let's say your start date is in cell A1 and your end date is in cell B1. To calculate the number of months between these two dates, you would use the following formula:

    Code:

    =DATEDIF(A1,B1,"m")
    This will give you the number of months between the two dates, rounded down to the nearest whole number.

Rob van Gelder

Try:
=MONTH(A2) - MONTH(A1)

Or:
=MONTH(A2) - MONTH(A1) + IF(DAY(A2)DAY(A1), 1, 0)

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Julie" wrote in message
...
I was able to convert start date and and end date to the number of days
inbetween the two dates. Does anyone know how to then convert the number
of
days into months?




JE McGimpsey

One way:

=DATEDIF(<start date,<end date,"m")

See

http://cpearson.com/excel/datedif.htm



In article ,
"Julie" wrote:

I was able to convert start date and and end date to the number of days
inbetween the two dates. Does anyone know how to then convert the number of
days into months?


Harald Staff

Hi

Use Datedif to find number of months between two dates:
=DATEDIF(A1,B1,"m")
And you know of course that 28 days may or may not be a whole month, so this
is not a very precise way to measure time.

HTH. Best wishes Harald

"Julie" skrev i melding
...
I was able to convert start date and and end date to the number of days
inbetween the two dates. Does anyone know how to then convert the number

of
days into months?




Rob van Gelder

I got that wrong - really wrong. Sorry about that.

Take a look at Chip Pearson's page on DATEDIF instead:
http://www.cpearson.com/excel/datedif.htm

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Rob van Gelder" wrote in message
news:...
Try:
=MONTH(A2) - MONTH(A1)

Or:
=MONTH(A2) - MONTH(A1) + IF(DAY(A2)DAY(A1), 1, 0)

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Julie" wrote in message
...
I was able to convert start date and and end date to the number of days
inbetween the two dates. Does anyone know how to then convert the number
of
days into months?






Julie

that was really cool! thank you so much!

"Rob van Gelder" wrote:

I got that wrong - really wrong. Sorry about that.

Take a look at Chip Pearson's page on DATEDIF instead:
http://www.cpearson.com/excel/datedif.htm

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Rob van Gelder" wrote in message
news:...
Try:
=MONTH(A2) - MONTH(A1)

Or:
=MONTH(A2) - MONTH(A1) + IF(DAY(A2)DAY(A1), 1, 0)

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Julie" wrote in message
...
I was able to convert start date and and end date to the number of days
inbetween the two dates. Does anyone know how to then convert the number
of
days into months?








All times are GMT +1. The time now is 06:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com