'Discord python bot: how do I find out how long a server member has been in that server for?

I just started learning how to code a discord bot with python. What I want one of its functions to do is to find out how long a server member has been a part of a server for, but I have absolutely no idea on how to code it. If anyone knows how to do this, could I see some example code?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source