Tool for capturing RDP session duration (and session info) on the server and keep record in MS SQL DB.
You will need to put a batch files as logon/logout scripts in your Group policy settings.
An example of SQL script to convert and filter data is a par tof this repo.