Thread: relative time
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
K Dales[_2_] K Dales[_2_] is offline
external usenet poster
 
Posts: 1,163
Default relative time

".41 months" is a tricky concept. Is that .41 x 30 days? Or 31 days? Or
what if the month in which it applies is Feb - should I make it 28 days?
What if the period for which it applies begins in Feb but spans into March?
Do I use 28 days, 31 days, or prorate it based on the number of days that
fall in each month. So to avoid quibbling over these details I will use a
standard 30 day month in the formula. A1 would be the cell containing the
number of months:

=EOMONTH(TODAY(),INT(A1)-1)+DAY(TODAY())+(A1-INT(A1))*30
--
- K Dales


"jsc3489" wrote:

Ok, say I have a number representing time. For instance, 3.41 months. I would
like to calculate (with some accuracy) to how many days this is.

I have a reference date, and I use =DAY(DATE(YEAR(B4),MONTH(B4)+1,0))
to count the days in my reference date. I'm looking to "pick apart" the 3.41
to change my formula to the next month, count the days, etc.

I could then multiply .41 to the days in the 4th month and then add them all
together to get my end result.

Trick is, to do any of the above. Any Takers?
--
I reject your reality and substitute my own.

Promote hydrogen - one of the best "clean" fuels there are!