In general, diarrhea caused by switching diets should last no more than 3 or 4 days at the most. Some dogs may take up to a week to adapt to the new diet but that is pushing it. In most cases, dogs acclimate to their new meal in two or three days.
The change should be made slowly even with the same brand of dog food because the items likely have different protein and/or carbohydrate sources. However, if your dog has any food intolerances or allergies, it may experience stomach problems (vomiting, diarrhea, or a loss of appetite).
Most canines will have no trouble switching flavours, but a small percentage of dogs may be allergic to certain substances, proteins, or flavours, resulting in vomiting, diarrhea, or other symptoms.
Unlike us, dogs have fewer taste receptors than humans. They don't mind eating the same food over and over. Once you've found a food that your dog likes, keep with it. Changing your dog's food type or brand can make it sick.