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.The contagious period — the time during which a sick person can give the illness to others — is slightly different for each virus. 1  Norovirus.2  With norovirus — the most common cause of viral gastroenteritis in adults and children — you're contagious from the moment you begin to feel ill. 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.