Quantcast
Viewing all articles
Browse latest Browse all 2677

NTA Report with automatic date range

Hi all,

 

We are building up a historic monthly NTA report, where custom SWQL query is the way to go here.

Since the ${FromTime} and ${ToTime} variables do not work with custom SWQL reports we need to determine a way to auto select the 1st day of the previous month to the last day of the previous month for the TimeStamp Column

 

At the moment the WHERE clause looks like this:

 

WHERE TimeStamp>='2016/10/01 00:00:00'
AND TimeStamp<'2016/11/01 00:00:00'

which works OK, but clearly needs manual editing every month.

I've been trying to use some SWQL functions but they always result in a report timeout message:

 

WHERE TimeStamp>=AddMonth(-1,DateTrunc('month', GetDate()))
AND TimeStamp<DateTrunc('month', GetDate())

 

Am I missing something or is there a better way to do the above?

 

Many thanks!

Antonis Athanasiou

Prosperon - UK SolarWinds Partners

Installation | Consultancy | Training | Licenses

Image may be NSFW.
Clik here to view.
facebook_icon.jpg
Image may be NSFW.
Clik here to view.
linkedin.png
Image may be NSFW.
Clik here to view.
blogger.png
Image may be NSFW.
Clik here to view.
twitter-icon.jpg


Viewing all articles
Browse latest Browse all 2677

Trending Articles



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