The most sage piece of advice I've ever received was from my father-in-law. I often find myself referring to it in all sorts of situations, at home, work or elsewhere. He said this:

"You can't change people, you can only change their attitude towards you."