Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello:
I need to extract the exact number of years between two date.
for Examplo,
If startdate = 30/04/2006
And
enddate = 15/04/2014
Result to obtain is 7 years and 11 months
To put a range for 1 to 7 years that person should not leave me.
Because it has more than 7 years
How do to limit that option and just go down the 7
The function age does not give me the exact years,
examplo:
=age('15/04/2014','30/04/2006')
We obtain: 7 years with several months.
I need a function that I have fulfilled the seven years:
For examplo:
Of 1 to 7 years this age('15/04/2014','30/04/2006') not qualify,he have more time.
This Qualify age('15/04/2013','30/04/2006') 6 years with several months.
I need an exact function of completed years, not more
helpme
please
LOAD
*,
If(Day(EndDate) >= Day(StartDate), MOD(MonthIDToday-MonthIDStartDate,12),
If(MOD(MonthIDToday-MonthIDStartDate,12)=0,11,MOD(MonthIDToday-MonthIDStartDate,12)-1)) as AgeMonths;
LOAD
*,
Age(EndDate,StartDate) as AgeYears,
Year(StartDate)*12+Month(StartDate) as MonthIDStartDate,
Year(EndDate)*12+Month(EndDate) as MonthIDToday;
Load * Inline
[
StartDate, EndDate
30/04/2006, 15/04/2014
];
Now you can use
=AgeYears & ' Years and '& AgeMonths &' Months'
Hi,
Another possibility:
If(AddYears(startdate,7)<=enddate, Floor((Year(enddate)-Year(startdate))*12+Num(Month(enddate))-Num(Month(startdate))+(Day(enddate)<Day(startdate))/12) & ' years ' & Mod((Year(enddate)-Year(startdate))*12+Num(Month(enddate))-Num(Month(startdate))+(Day(enddate)<Day(startdate)),12) & ' months')
This returns Null if there's more than 7 years, otherwise years and months as a string.
Hope this helps.
The QV function
=age('15/04/2014','30/04/2006')
does return '7', not anything like '7 years and 11 month'.
I not sure why this doesn't work for you. See also your other thread on how to calculate Years, Month and Day difference between two dates, this has worked for you, right?
Age function returns an integer, not a fraction.
=age('15/04/2014','30/04/2006') returns 7 not 7,<something>