If you are referring to the tank itself, ...years and years if you do some maintain it in good conditions.
If you are referring to the air in the cylinder, it depends on several factors.
Let's take a 15L cylinder with 200 Bars. That means 3000 L of air.
Now average breathing rate is 18-20L/minute (on the ground). taking 20L/min
that means 150minutes, that is 2 hours and a half. ON THE SURFACE
BUT going underwater you do not breathe air at 1 Bar.
Let's imagine you stay at 10 m depth. That means ambient pressure (pressure surrounding you) is 2 Bars.
That means that every breath you take consists of double the amount of air. If you consume 20L/min at sea level, you will consume 40L/min at 10 m. The air in the tank will last 75 minutes.
Summarising, you have to take into consideration your breathing rate and the depth you are diving.
Please note that breathing rate depends also on water temperature, water conditions, stress and so on. You will see that you will tend to consume less and less air along with your experience. This does not mean holding your breath, but breathing underwater exactly the same way you do when you are at home.
Please try to read again the laws of gases, like Boyle's low. That explains to you why you breathe different quantities of air at different depths.
ciao