Q:

How can I replace digital alarm clock batteries without it losing the time and date?

My digital alarm clock takes 2 AAA batteries. Every time that I have to replace it's batteries it loses the time and date. 
I tried to replace first 1 battery and then the other (so that the system will always have at least 1 battery during the change) but the same seems to happen.
Is there a way that I can achieve this?

A:

Replace the batteries at 11:59 PM. By the time they're changed, it will be midnight, which will be the default time on your clock. You won't need to change the time at all!

A:

Replacing one cell at a time doesn't work because, first, a single cell has too low voltage to operate the clock, and second, the cells are in series, so both are required to form a circuit.
If you can manage to supply 3V to the terminals in the battery compartment, in a manner that won't be disconnected when you remove the batteries, that will keep the clock operating while you change the batteries.  This power could be supplied from an external 3V (2xAAA, 2xAA, 2xC, or 2xD) battery pack with suitable connecting devices wired on.  Be sure to get the polarity correct, or you may damage batteries and the clock will surely stop/reset.
Of course, the process of connecting external power, changing batteries, and disconnecting external power, without interrupting the power for even a fraction of a second, is probably about the same as resetting the clock's time and alarm, and I'd expect it to be necessary only once a year or so in any case.

A:

To achieve that in electronical way! you can use something called Multiplexer "power mux" this IC works as a switch, it will take voltage from two sources when the main source cut out it will switch so fast to the second source.
In your case connect your clock to this circuit, provide a second power source to it, when you take the battery off it will switch to the second source and when you replace a newer one it will back to the old source.

