How to get the date in which user joined channel?

My task is to, on the chat screen between the messages, display info about users that joined or left the channel.
Is there any way to get the date the user joined/left the channel?
If not, do you have any idea how can I achieve that?
Should I try to put it into channel metadata or sth?