Formula can prepared and then refrigerated for 2 days. If the baby has not had a drink from the bottle it can be out for 2 hours. If the baby has already had a drink of it, only 1 hour.
Personally I started out putting water in a travel thermos to keep it lukewarm and bringing along one of those sectioned powdered formula holders. Then once he was okay drinking water of any temperature, I started putting the correct amount of water in the bottle before our outing. But as he got bigger and I was able to predict how much he wanted, and also when he started drinking 8 ounce bottles I needed something that held more formula so I used those 8 ounce sample cans and just kept refilling it with formula and brought along dry bottles and bottled water.
If you are worried about warming it up, there are bottle warmers as mentioned, but I loved the travel thermos. Mine held 16 ounces, so it was good for 4 bottles in the beginning and 2 bottles as he got bigger.
In fact one thing was helped me out a lot when he was first born was to buy a good quality pumping coffee carafe to use at home. Each night before bed I would fill it up with warm water and it held the water I would use for bottles all day long the next day. You can just pump out the correct amount into the bottle without using the sink and trying to get the temperature right each time. Mine was $20 at Target [Thermos brand even!] and it was a life-saver to have at home