How do I get to only display t_stamp values based on my reports Start and End date

#1

So I currently have a transaction group that executes every 10 seconds and i want to display the tag values in my report between the start and end date of my report.
For example if my reports start date is at 12 am and end date at 12pm how would you write a SQL Query to only display the values from all the time stamps between that start and end date.

0 Likes

#2

in the WHERE part of your query you need to have a part that is similar to t_stamp between ? and ?. The questions marks you would have to link to your parameters for your reports start and end date. A real basic example of what I’m talking about is using report parameters:

SELECT *
FROM table
WHERE t_stamp BETWEEN ? AND ?

I would try it out in your query browser first to see if you get the results you want. There you would want to put in the actual date/time instead of the ?'s

SELECT *
FROM table
WHERE t_stamp BETWEEN '2019-08-22 00:00:00' AND '2019-08-22 12:00:00'
0 Likes

#3

Thankyou ill will try this

0 Likes