The 2000 Xterra's Air Conditioning is sometimes cool but may not work other times.
Take a look at the AC Compressor to see if the clutch is engaging. The Air Conditioning System will get cold when the clutch is engaged but the clutch quickly quits and just blows semi cool to warm air.
One possible cause of this symptom is that the Thermistor may be defective. Here is how to troubleshoot and replace the thermistor.