Date Fomula

gymwrecker

Active Member
Joined
Apr 24, 2002
Messages
394
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I'm trying to come up with a formula to determine the number of years, months, and days (in this format) when subtracting from a specific value, i.e.

17 Years, 0 Months, 0 Days (this will always be the same and will not change)

For example, I need to deduct 15 Years, 5 Months, 25 Days from 17 Years, 0 Months, 0 Days, and need the result to be in the same format (2 Years, 7 Months, 5 Days)

Any help is greatly appreciated.
 
Last edited:

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Please explain how you calculate the result that you show.

A few examples posted with the forums tool named XL2BB would be helpful.

If you convert your example to dates, how may days would be the difference?
 
Upvote 0
That's not going to be so simple. Since the time span "1 year, 1 month" for example can be very different depending on where this time span starts. If the year has 366 days or 365, how many days the month in that time span have.
You would need to tell us a little more about how you want to subtract these times and what the expected result should look like.
Where do these timespans you are subtracting come from?
Can you share some more examples?
 
Upvote 0
I'm basically converting Active Duty (Army) points (1 active-duty day equals one active-duty point) into dates:

i.e., 5,992 points is the equivalent of 16.4 years, or 16 Years, 5 Months, 2 Days (you get this by dividing 5,992/365).

So, for example, in cell B3 I have the following value: 5,992, and in cell B4 I have the following formula =INT(B3/365)&" Years, "&INT(MOD(B3,365)/30)&" Months, "&ROUND(MOD((MOD(B3,365)),30),0)&" Days", and the result displayed in B4 is 16 Years, 5 Months, 2 days (this is the format I need).

I'm looking for a formula that returns the difference in Years, Months, and Days by Subtracting the result in B4 from 17 Years, 0 Months, 0 Days (this is a standard value and cannot be changed).

I hope this helps!!!!
 
Upvote 0
That's not going to be so simple. Since the time span "1 year, 1 month" for example can be very different depending on where this time span starts. If the year has 366 days or 365, how many days the month in that time span have.
You would need to tell us a little more about how you want to subtract these times and what the expected result should look like.
Where do these timespans you are subtracting come from?
Can you share some more examples?
I can use 365 as a standard....
 
Upvote 0
Please try to answer the questions in #2 and #3.

What is your source information and what is the expected result.
Please post your examples with the forum's tool named XL2BB.
 
Upvote 0
I'm basically converting Active Duty (Army) points (1 active-duty day equals one active-duty point) into dates:

i.e., 5,992 points is the equivalent of 16.4 years, or 16 Years, 5 Months, 2 Days (you get this by dividing 5,992/365).

So, for example, in cell B3 I have the following value: 5,992, and in cell B4 I have the following formula =INT(B3/365)&" Years, "&INT(MOD(B3,365)/30)&" Months, "&ROUND(MOD((MOD(B3,365)),30),0)&" Days", and the result displayed in B4 is 16 Years, 5 Months, 2 days (this is the format I need).

I'm looking for a formula that returns the difference in Years, Months, and Days by Subtracting the result in B4 from 17 Years, 0 Months, 0 Days (this is a standard value and cannot be changed).

I hope this helps!!!!
Why don't we subtract the points and after that we covert to years, month... ? Would that work? Because I guess that 17 years is the equivalent of some number of points in the end. (17*365 = 6205 for example?)
 
Upvote 0

Forum statistics

Threads
1,221,526
Messages
6,160,340
Members
451,637
Latest member
hvp2262

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top