Reseat the bios battery and try again.
If that does not work, you may have a duff battery
or the circuit that sends the power to the cmos is damaged.
When you have the mains lead into the computer with the mains power socket switched on. It still sends power through the motherboard even if the computer is turned off. So this power by-passes the bios battery and keeps the bios ticking over.
So it must be a duff battery, not inserted properly or a damaged bit of circuitry.