After recovering from diarrhea caused by a virus, you may have problems digesting dairy products for up to 4 to 6 weeks. This may cause you to have diarrhea for a short time after eating or drinking milk or milk products.