According to the Partnership for Animal Welfare, puppies are only physically able to hold their urine for two hours. However, puppies are usually not mature enough to understand how to control their bladders until they are 16 weeks of age.
PAW says that while puppies learn to control their bladders by week 16, they are not able to be reliably housetrained until they are at least 6 months old. Once a dog is housetrained, owners do well to remember that even mature dogs are only able to hold their bladders for a few hours. Dogs are not able to hold their bladders during the day as long as they hold it at night. Just like with people, holding off eliminating urine is easier for dogs during sleep cycles.