It has to consider the first six digits first, because it is the YYYYMM ( YEAR-MONTH). so 201205 has to come first, then 201204 and so on. After considering this, if there are two entries for same YYYYMM, then go for the last two characters, which are WR,WA,WW, CR,CA,CC..

It has to consider the first six digits first, because it is the YYYYMM ( YEAR-MONTH). so 201205 has to come first, then 201204 and so on. After considering this, if there are two entries for same YYYYMM, then go for the last two characters, which are WR,WA,WW, CR,CA,CC..

It's unfortunate that you didn't say this at the beginning - people
are trying to help.