Lord Shiva can be viewed in two senses. I dont know which one you are referring, so Im gonna tell both.
First of all, Hinduism teaches monotheism, the absolute Nirakara Rupa Parabrahma being classified into different forms or avatars like waves in the ocean. Lord Shiva is one of it. Therefore, he can supposed to be a personification of a form of energy required for act of destruction, scientifically speaking. Lord Shiva is then part of the absolute, you cannot tell which yuga he lived because he is always living. It's like asking in which year did kinetic energy exist?.
If you are asking in the context of Puranas, then, Lord Shiva didnt die to be said 'lived'. Unlike Gods such as Sri Ram, Krishna etc who are avatars or human forms of God, some superior Gods such as BrahmaDev, Vishnu and Shiva live forever until the cycle of life ends and they get reborn. I will give you his time span. Lord Shiva lives upto 400 BrahmaDev Years. And how long is 1 year of Brahma, u may ask...
4,320,000,000 human years = 1 Chatur Yuga of Devas
1000 Chatur Yugas = 1 Maha Yuga
1 Maha Yuga is also collection of the four Yugas - Satya Yuga, Treta Yuga, Dwapara Yuga and Kali Yuga.
1 Maha Yuga = 1 day(excluding night) of Brahma
In 1 day(1 Maha Yuga) of Brahma, he does the divine job of creation with the help of 14 Manus one by one. By this calculation, in the present, 6 Manus have done their job. Right now, the seventh Manu called Vaivaswadan is helping Brahma for creation. Everything that Brahma created a day will be destroyed at the time of dusk.
Brahma has a life span of 100 years. Once he dies, a new Brahma will be born. It is said that millions of Brahma has already born and died earlier.
It is also said that 14 Indras will born and die one by one in each Brahma’s life.
Currently, we are all in the 1st day of the 51st year of Brahma and 6 Manus have done their job.
So, Shiva is actually above the yugas. Yugas are timescale of our world and Lord Shiva is beyond that.