If you have upper gastrointestinal bleeding, you need to actively stop the bleeding and treat the symptoms, at the same time, you need to fast and abstain from water, you can eat and drink water only when the stool turns yellow, it is hard to say how much time it takes, the stool can only turn yellow within 2-3 days after the blood stops, so how long can you drink water when you have gastrointestinal bleeding is when the stool turns yellow, you can eat and drink water, start with a small amount of liquid food. If you are suffering from upper gastrointestinal bleeding, mostly seen in gastric disease and liver cirrhosis, it is recommended to do further gastroscopy and liver ultrasound to further clarify the diagnosis and then treat the symptoms.