Hi Robin,
It is very simple but be careful not to calculate the seniority in days....! convert it in years. b'coz then only data would be compatible (compatible to ranks ranging from 1 to 14) as even 20% of 1000 days of seniority would be 200 days and will lead to misinterpretation...