calculate the difference between two UTC times in hours C#
How do I calculate the difference between two UTC times in hours? This is what I have tried: lastSuccessfulRunTime // UTC Time int timeDifference = (DateTime.UtcNow – lastSuccessfulRunTime).Hours if (DateTime.UtcNow – lastSuccessfulRunTime) = 9.00:00:00.7944388, timeDifference will be 0 which is not what I need. >Solution : The Hours property returns the integer hours value of… Read More calculate the difference between two UTC times in hours C#