Nikon d40 resets battery date and time?

The shutter went out not too long ago andi had that replaced and now shortly after when I have to recharge a battery and put it back in I have to set the date and time…
What's going on? I never had this problem before, what can I do to get it back to normal?

What does Nikon say?

The internal batter must be low or dead a nikon d40 is a little old thou the battery inside is like one in a watch and it ushally dies down after 4 or 5 years and the time inbetween charges or just taking the batter y out gets shorter just like any other battery it is prob time for an upgarade.