AnsweredAssumed Answered

Sort order issue when calculated age reaches 11 months

Question asked by scottlynch on Jul 11, 2015
Latest reply on Jul 13, 2015 by philmodjunk

Title

Sort order issue when calculated age reaches 11 months

Post

I'm using this calculation to determine a persons age.

GetAsText ( Year ( Get ( CurrentDate ) )  - Year ( Date of Birth) - If ( Get ( CurrentDate ) <  Date ( Month ( Date of Birth ) ; Day ( Date of Birth ) ; Year ( Get ( CurrentDate ) ) ) ; 1 ; 0 ) ) & " Years, " & GetAsText ( Mod ( Month ( Get ( CurrentDate ) ) - Month ( Date of Birth ) + 12 - If ( Day ( Get ( CurrentDate ) ) < Day ( Date of Birth ) ; 1 ; 0 ) ; 12 ) ) & " Months, "

I then have a simple list that sorts the people into age order. The issue I'm having is that when a person reaches their age in years and "11months"  that particular person falls out of sort order. Im assuming that there's something wrong with the calculation, but i copied it from FileMaker help files? 

This example is copied from my list.

53 years 10 months
34 years 11 months
31 years 11 months
25 years 11 months
52 years 5 months
49 years 9 months
49 years 4 months

Thanks in advance.
 

 

 

 

 

Outcomes