Is it a colonoscopy you’re having or some other type of endoscopy?
If it’s a colonoscopy you should have received, or will receive, a sheet of foods you can and can’t eat for two or three days before, and some stuff to take which will clear your bowels out to be taken 24 hours before the procedure.
If it’s not a colonoscopy then it’s not necessary. It may be a sigmoidoscopy, which doesn’t require the same bowel clearance, just some stuff up the bum at the hospital just before the procedure.