No, while hand sanitizer is fairly effective in killing viruses and bacteria, it is by no means a good substitute for washing your hands.
The reason why washing with soap and hot water is more effective is because of the way that it functions. Soap attacks viruses in 2 ways. It prevents them from attaching to your hands as well as killing them. This proves much safer than simply hand sanitizing. Because of this, whenever you have the option to do so, wash your hands with soap and hot water.