Unused formula

My LO started to stir so I figured I'd make him a bottle before he got all worked up for food. I come back from the kitchen and he's passed out again 😐😧 I'm guessing he just had a bit of gas...

My question is, if I cap the bottle and put it in the fridge will it still be good for whenever he does decide he's hungry? How long of a time frame do they last in there?