It sound like your dip tube has gone south. This is fairly easy to check. The dip tube is a plastic tube that slips into the cold water intake at the top of the tank and reaches to the bottom of the tank so that the incoming cold water goes to the bottom of the tank where it heats and at the same time forces the hot water to the top of the tank where the outlet is located. When the tube fails, the cold water mixes with the hot water at the top of the tank so the water will never get to normal temperature. To check and replace if necessary, just shut the water off, disconnect the inlet pipe on top of the tank. The dip tube is a flanged tube that just hangs by its flange in the top of the inlet. Fish it out. If it is broken, just get a new one from virtually any hardware store or plumbing department. If the tube is too long, trim the lower end of the tube so that the tube goes nearly to the bottom of the tank. You have to worry about being too precise, just close. Then just drop the into the tank and replace the intake.