The term you can't teach and old dog new tricks applies to both dogs and humans I think, this is because the older you get the stubborn you are, the more stick in the mud you are and the more you are adverse to learning new things.
If you want to train your dog, better start while he is still a puppy. Although I am not ruling out the fact that an older dog can't be trained. Here's a story, my husband's friend found a dog, not really a puppy but not old either. The dog obviously was a rescue. Anyway, so when he got the dog, the dog was kind of wild like not well disciplined. So it took a lot of effort on the owner to train the dog, like if the dog will misbehave, he will spank it. He doesn't have any formal training on how to train a dog, he just uses the technique if you will train a child.
And now, his dog is just the envy of his friends. When he goes grocery shopping, the dog will carry the grocery bag on his mouth. He will not eat anything not fed to him by his owner, and he doesn't bark at guests plus he doesn't fight with other dogs who aggravates him.
So if you are seriously in wanting to train your older dog, it is not actually something that cannot be done. It can, you just have to have a lot of patience.
This article may help you How to train and older dog
Best of luck!