As a guideline, if your gastroscopy is in the morning, you shouldn’t eat or drink anything after midnight before your procedure.
If your gastroscopy is later in the afternoon, it is required that you don’t eat anything 6 hours before your procedure, and don’t drink anything 2-3 hours before your procedure.
However, your doctor will provide you with the exact and more detailed information about your fasting requirements before your gastroscopy procedure.