If this a CSV file that you normally export, it might be worth it to use PowerShell's CSV functionality to read each row and capture Date+Time as $StartDate for records with Status LOGON. Then you could use a function like this to get the difference in hours in a variable (Ex.):
$Count = NEW-TIMESPAN -Start $StartDate -End $EndDate
$Count.totalhours
This is just and idea of what you could do. You might want to try the PowerShell forum if want to learn more.