Hello again and thanks for waiting.
I have worked out an answer for you below ...
Metronidazole is an antibiotic which is sometimes prescribed for dogs and is generally safe for them and usual dose rate would be around 10 mg per pound of your dog's bodyweight given twice a day so you have not done any harm in terms of dosing. Be aware though that a range of dose rates is possible, you can check this out along with a lot of other information on how this drug is used in the dog HERE
Like all antibiotics Metronidazole should be given as a course of say 5 to 7 days and it could take two to three days before you see any improvement, that is to say it does not work at once, you have to give it time. As your tablet was three years out of date it is likely it is not going to be very effective in any case. I would personally avoid using the Cephalexin in this sort of situation, it is more suited for skin cases and in any case it is well out of date as well. Many vets these days would initially avoid the use of antibiotics for an uncomplicated diarrhoea case.
That said that there are things you can do on a home remedy basis, there are a number of home remedies for diarrhoea in the dog, these can often work well for uncomplicated cases where for example a dog has eaten something he should not have out in the yard, or had some unaccustomed rich foodstuff, or has somehow acquired a minor tummy bug. Here are some examples.
1. I am aware that some owners use Pepto-Bismol to treat their dogs with gastro-enteritis and report success. Here is a link to a web page which has all the information you might need including dose rates : LINK
2. Some owners try and control the situation with diet alone before they try anything else. This is logical and often works, the basis of this is to give the intestinal tract a complete rest and then bring it back slowly to function, resting the alimentary tract is the critical factor. It would go something like this ...
A. Starve him for 24 hours but make sure he has access to water.
B. The next day feed him four or five small light meals in the day. These meals should be the likes of chicken, fish, scrambled egg etc. with a little rice.
C. If he picks up on this diet gradually reintroduce his normal diet over the next few days.
3. Live yogurt added to the food can often help. Some gastro-enteritis situations are caused by an imbalance in the bacteria in your dog's gut. Live yogurt is full of " good " bacteria and will seed them into your dog's intestinal tract and restore the balance. A tablespoon twice a day would be fine for your dog.
Of course if any of the above does not quickly start to work or if he deteriorates further in any way you should have your vet check him over just to be on the safe side.
I hope I have covered your question fully enough but if you would like further clarification or to talk things over a bit more then I will be on-line for the next hour or so and I will be more than pleased to continue working with you.
Please be kind enough to rate my service to you after we have concluded our dialogue, such feedback helps me maintain the quality of my answers.