Air conditioner problem

I have a 1996 nissan altima with 281,000 miles on it. My air conditioner blows cold for a few minutes then starts to blow warm air. Sometime , it will start to blow cold again but not for long.

When the weather is cooler, like early morning, it will blow colder longer. After I come out of work, when it is very hot, it will only blow warm. Any thoughts? Thanks for any ideas.