If you click on a switchport, you will be able to see the historical status of the port in a little bar.
Hovering over it will show you when it transitioned into different states.
One thing to note is that by default, the historical data shown will be from the last 24 hours.
You need to change the dropdown to select longer time periods (up to 30 days)
For anything longer than 30 days, you'll need a 3rd party monitoring tool that can pull and store historical data or event logs from the switch.