[Help!] Nested Query for Tag Historian Reporting

Hello.

The goal of my report is to display the duration (on) of a tag historian tag for the past week. Therefore, I have the parameters set up as:

{StartDate} = now()
{EndDate} = dateArithmetic(now(), -7, "day")

However, the report needs to only collect the data during shift hours which are 6PM to 6AM every day. How would I add this condition to my tag historian query in reports?

You can not "skip" time periods during a day with a tag history query binding.

You say this is a report, are you actually using the reporting module?


Yes. I'm seeing if there is a way to do this using the nested queries in reporting

I would suggest using a scripted data source. Then you can request only the time periods which you are interested in.

You also have StartDate and EndDate backwards.