There is also another issue, many devices work good with alkaline batteries (nominal 1.50V / cell) but have faded display or a weak life with Ni-MH and Ni-Cd batteries (nominal 1.25V / cell) even if just charged.
For this reason is good to adapt your device to be connected to a wall power supply. Wall wart chargers for cellphones can be bought at every electronic fair for a pair bucks, and you probably already have some of them unused at home. Any wall wart from 4.5 to about 30V DC output will be good for this project.
So, let's see how to convert your batteries compartment to receive that wall-wart's plug.
Step 1: Components and tools
The main component is a tiny voltage regulator, the L78L33 in my case, but you can buy one with an output voltage from 3.3 to 24V, to match voltage of your device. This regulator can deliver a current of 100mA, this means that it's suitable for devices which usually drain the batteries (let's say 2400 mA) in not less than one day, so I think all the clocks, alarms, wireless devices, etc.
If this won't work, you can use a powerful voltage subbply as the LM78XX serie (up to 1000 mAh).
Refers to the attached data sheets for pins layout.
Then we need two ceramic capacitors. You can buy them or find on some dismantled electronic stuff. The values of 100nF and 330nF are not mandatory and any similar value is good enough.
Furthermore these two capacitors improve the circuit safety and functionality, but they're not essential, so you can decide to avoid adding one of them or both.
Last component is a female socket suitable for my wall wart plug. Mine is a 2.1mm x 2.5mm power plug, but if you want to use an old Nokia cellphone's charger (for example) it's smaller, 1.3mm x 3.5mm if I'm not wrong. You can find any type of these sockets on eBay.