I am trying to make a table that compares the current value of a tag, to the value of it from a date in the past that is selected by a datetime input. I was previously doing this with a system.tag.queryTagHistory that looked like this
system.tag.queryTagHistory(paths = getPaths,startDate = firstStart, endDate = firstEnd, returnSize = 1, aggregationMode=“LastValue”, noInterpolation = True)
I have a bunch of paths, and I just want to get what each of the tags values was at the time, so I made that time the endDate, and then a subtracted 5 hours from that and made it the startDate.
Then I returned the “LastValue” so that I get the most recent value, effectively giving me the value at the endDate which is what I want.
All I want is what the values were at that time.
Is there a better way to do this?
Thanks