How to query historical data at a certain time in Ignition

My database is mysql. If I want to know the value of a tag at a specific time (e.g.2019-3-5 08:00:00), how do I do that in Ignition.

Use system.tag.queryTagHistory to get historical tag values as stored by enabling history in tag configuration. Or system.tag.queryTagCalculations to get a single value.

1 Like

Please help me figure this out:

I am running a queryTagHistory script to get the max value of a tag in a look-back of 30 seconds. This returns the expected max value of the tag trend, but it always returns the startDate of my query and not the timestamp of the max value. And the max value is not at the start of my window, it's near the middle.

Can you post your script (maybe in a new thread)? That function returns a dataset, so I am curious how you are getting the max value.