You can be contagious from a few days up to two weeks or more, depending on which virus is causing your stomach flu (gastroenteritis).A number of viruses can cause gastroenteritis, including noroviruses and rotaviruses. Some people may be contagious for up to two weeks after recovery. 2  Rotavirus. 3  Symptoms of rotavirus — the leading cause of viral gastroenteritis in infants and young children — usually appear one to three days after exposure.