it is a bitch. sorry, but you have to remove the door panel. Then, there are two bolts with nuts on the inside that you are supposed to be able to get a wrench onto from the door panel side. usually the nuts are rusted on. This was a conspiracy by Nissan not to ever allow anybody to remove one of their mirrors. Unless someone else has a different opinion, the average person has a tough time. it takes a pro with cutersm torchesm, etc. don't count on it coming out with a wrench alone.
the rearview is easy. it just pulls of and the associated hardware simply unscrews and comes off.