Hi,
I have a basic knowledge of SQL, so apologies first of all.
I have a database, which stores a new set of row data every 5 minutes. I would like to create a report on this data which include two date/time filters and I am not sure on how to go about this.
For example, my report would show a range of data for the last month and for this I am using the following WHERE clause:
(DateTime between (DATEADD(m, DATEDIFF(m, 0, getdate()) -1 , 0)) AND (DATEADD(m, DATEDIFF(m, 0, getdate()) , 0)))
What I would also like to do is only show data that was stored between two timeframes each day i.e. between 9am and 6pm.
If anyway can assist in me getting this filter together, as I have been told it should be possible.
many thanks
I have a basic knowledge of SQL, so apologies first of all.
I have a database, which stores a new set of row data every 5 minutes. I would like to create a report on this data which include two date/time filters and I am not sure on how to go about this.
For example, my report would show a range of data for the last month and for this I am using the following WHERE clause:
(DateTime between (DATEADD(m, DATEDIFF(m, 0, getdate()) -1 , 0)) AND (DATEADD(m, DATEDIFF(m, 0, getdate()) , 0)))
What I would also like to do is only show data that was stored between two timeframes each day i.e. between 9am and 6pm.
If anyway can assist in me getting this filter together, as I have been told it should be possible.
many thanks