Additional useful info for this problem...
1. The first sign the battery needs replacing is normally the time and or date will be incorrect. Or be incorrect on some restarts (NOT always the case but typically the first sign)
2. If you have lots of startup tasks (examples... Checking Java, Flash etc for updates) Or lots of Task Scheduler related things set the system may crash (again related to time/date, but in this instance the time/date can appear to be correct, only the computer has checked/done your tasks on a boot up when the time or date was not correct, leading to your computer being confused why you have travelled back/forward in time when it checks the startup tasks).
3. Battery info... The most common size/name in a computer is a CR2032 battery. Typical CMOS/BIOS battery life is 5 years, HOWEVER this can be significantly less if you have a cheap/unknown brand battery installed. I recommend NOT to use cheap batteries from pound land (dollar store for the US readers). They are often brought from a large warehouse and have been sitting around for considerable time, sometimes years (if you can find the expiry date on the package take a look and ensure it has at least 2 years to run, anything less, especially considerably less and the battery has been sitting around for a while).
The best brands in my personal experience are Duracell and Panasonic (they can and do last upto 8 years).
Other brands which should last you 3-6 years are Maxell and Energizer.
Poorer brands such as Kodak and Polaroid which you would think are good are not (Kodak just sell the rights to others to slap their name on the package and Polaroid as you most likely know them IE Polaroid Corporation went Bankrupt 20+ Years ago which has led to other organisations using the same name and some other organisation owns the original logo).
Tips BEFORE you change the battery
1. Enter your Bios and make a note of any settings you have at some stage altered (Typically this will be boot sequence of drives, Bios passwords, Overclock settings etc). DO this before you rip the battery out cos once you do the BIOS will go back to its defaults.
2. When you have replaced the battery do NOT go straight into your bios altering things back to how you had them.... If the new battery turns out to be a dud you will have wasted your time. Set the bare minimum you have to (like boot sequence of drives, time and date) and run your computer for 24 hours or at least with a few restarts to check issues have gone away. If all seems solved then you can go through your bios and set everything back to how you had it.
3. If you have a small tip/fine line marker men, write on top of the battery the date you replaced it, that way in future if you have issues which could be battery related you will know instantly how long the battery has been in your machine and if it is the likely issue to the problems.
4. Try not (Impossible i know for some) to regularly restart or power the computer on and off. The bios battery typically only saves and recalls settings for any changes in your bios and keeps track of the time and date. Multiple power ons means this information has to be accessed and like any battery the more you use it the less time it lasts.
Obviously YES before you ask typically all the time the computer is powered on or off the battery is in use, BUT its not using as many volts. On start up it can use beyond its 3V rating (sometimes as much as 3.5V) after that it will settle and use between 3.0-3.3V. I know it does not sound much but over the years an extra quarter to half a volt use here and there can make a big difference in terms of life span. (Now you know why any server or NAS box you may have which is always left on never seems to need a new battery)
Hope this is of some use to people.