Converting between XML systemtime and number of hours or days with Powershell

By Tom Kitching

I recently used an XML query in Powershell that looked like this:

The query was used to filter events from the event log that occurred within the last 24 hours.  However I needed to…