April 11, 201312 yr Hi every one, I need to calculate the number of years and months between two dates fields. August31 = 8/31/2013 DOB = 9/1/2009 I need the calculation to show: 3Y 11M I appreciate any help. Thanks
April 11, 201312 yr This calculation should do the trick: Let([ ElapsedYears=GetAsText(Year(SecondDate) - Year(FirstDate) - If(SecondDate <Date(Month(FirstDate); Day(FirstDate); Year(SecondDate)); 1; 0)); ElapsedMonths = GetAsText(Mod(Month(SecondDate) - Month(FirstDate) + 12 - If(Day(SecondDate) < Day(FirstDate); 1; 0); 12)) ]; If(FirstDate="";""; ElapsedYears & " Y & " " & ElapsedMonths & " M") ) I can't take credit for it; I found it in a custom function years ago. Sorry I can't remember where, so I can't give proper credit.
April 11, 201312 yr Hi every one, I need to calculate the number of years and months between two dates fields. Also, look at the available Custom Functions at Brian Dunnings site here LINK and search for Elapse
April 15, 201312 yr It depends on what you're using it for and how you define a "month". Doug's example is okay, but you may consider January 29th, 2013 to February 28th, 2013 a month, while that calc doesn't.
Create an account or sign in to comment