How do you make formula to go out?

Ra
My midwife advised to make bottle in house which can be kept for 2 hours. But if out longer than 2 hours how do you make the formula?