If i were to take a working battery off a car, how long can it be left doing nothing before it became useless?
Put it in the fridge. It'll keep longer.
Do not put it in the freezer unless its fully charged.
(At this point you are asking yourself whether that was a joke, or a serious comment, right.)
If you are merely asking how long before it goes flat, that's a completely different question. The answer is a few months. And the solution is to put it on a trickle charger.