The problem is simple. I have an IMEI and I want to retrieve a TAC from it. How can I do it? Is there a way of recognizing how many digits should TAC have if I have just an IMEI? Is it necessary to know explicitly the year of production of the device to know it?
Read 8 digits from beginning. TACs with 6 digits are rarely and are in the past (since 2004).
But for safety you can analyze it twice, and begin from longest version, then use short. If you find phone model, then you use that TAC. If not, then use 8 digits, because old phones are well known (in most cases).
To transform tac to phone model use databases: