Help With queryTagHistory

I am attempting to use system.tag.queryTagHistory to get my tag data for a 24 hour period, from midnight to midnight of the previous day. I am specifying a returnCount of 24 in order to get data at 1 hour intervals.

What is happening is that I am getting more rows returned than I am requesting. Instead of 24, I see 41.

I have two calendar popups to get startTime and endTime. Resolution calculates the returnSize based on what intervals the user wants to use. I put specific returnSizes in to eliminate possible issues but same behavior. My call looks like this:

system.tag.queryTagHistory(tagPath, startDate = startTime, endDate = endTime, returnSize = resolution, aggregationMode = ‘Average’)

I added the keyword invocation to try and eliminate as much ambiguity as possible.

Any help would be greatly appreciated! :slight_smile: