I am trying to compare dates using the DateDiff function in order to calculate the run time of a machine.
I am running into issues with rounding milliseconds though. In order to get the time of an event, I use the "vrdate" value from the "GetValue" method, however the date that is returns appears to be truncating the milliseconds portion of the timestamp. For example, if I right click on the trend that I am pulling data from and select "Show Details and Annotations," it display's the event time as "6/28/2016 12:35:37.97101 PM," however the corresponding vrdate value will be "6/28/2016 12:35:37 PM."
This ends up causing inaccuracies when I use the DateDiff function with vrdate as it is being truncated.
I was wondering if there is any way to prevent the vrdate value from truncating and instead have it round up the data to the nearest second.