Quantcast
Channel: THWACK: Popular Discussions - Script Lab
Viewing all articles
Browse latest Browse all 9937

2 time related script questions for report writer (SQL) commands

$
0
0

Hello,

I am having an issue trying to create 2 custom reports.

report (WAN Outage)

#1 is supposed to display only a certain device type based on certain filter criteria & the time frame is supposed to be the previous month (not just the previous 30 days).

I have the filter criteria working fine for what devices will show but my time frame seems to only be working for the last 30 days, not the previous full month.

This is the portion of the script I believe needs to be tweak.

eventtime between  (DATEADD(m, DATEDIFF(m, 0, getdate()) -1 , 0)) AND (DATEADD(m, DATEDIFF(m, 0, getdate()) , 0))

 

report (Hihg Response Time last 12 hrs

#2 is supposed to go back over the last 12 hours and report based upon high ping response with a threshold filter.

The threshold filter & ping portion is working fine but again I am having issues with the "last 12 hours" portion of the command syntax. This is the time portion I currently have.

WHERE
( DateTime BETWEEN 41330.0231018519 AND 41330.5416666667 )

GROUP BY Convert(DateTime,Floor(Cast((DateTime) as Float)*24)/24,0),
Nodes.Caption

 

Thank you for your help.

Mike


Viewing all articles
Browse latest Browse all 9937

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>