Jump to content
symmetricgroup

Report to show pcs added within last 2 weeks

Recommended Posts

Hello, I'm trying to get some way to see the pcs added to Automate in the last 2 weeks. I've tried messing with Report Designer, but that didn't really work out as I couldn't get it to sum up all the machines, just keeps saying 1 because the Iif() statement I had was true.

 

I then tried making an sql view, by checking the DateAdded column and comparing it to the current day (with NOW()) - 14 days but kept pulling lots of pcs that have been around a while

 

A little at wits end here. Has anyone made anything similar to track what workstation/servers been added in a particular date range?

Share this post


Link to post
Share on other sites

Does the code below help? It uses the DATE_SUB() function to subtract 2 weeks from NOW().
I use something a bit similar in a script that runs on our Automate server every Monday to collect info like what is listed below.

SELECT c.ComputerID, c.Name AS ComputerName, c.ClientID, cl.Name AS ClientName, c.LocationID, l.Name AS LocationName, c.DateAdded, c.Domain, c.OS, c.BiosMFG, c.BiosName, c.BiosFlash, c.BiosVer, c.LastContact, c.LocalAddress, c.MAC from (computers c JOIN clients cl ON c.ClientID = cl.ClientID) JOIN locations l ON c.LocationID = l.LocationID WHERE DateAdded > DATE_SUB(NOW(), interval 2 week)

 

  • Thanks 1

Share this post


Link to post
Share on other sites

This function is already built-in from a stock internal monitor.. you will want to adjust the 1 day to 14 days in the "Result" line below.


image.png.fd88298131c0ab3a621138f033024efa.png

  • Thanks 1

Share this post


Link to post
Share on other sites

Wow, that needs fixing .. looks like they broke the stock monitor rofl. Sigh, log it with support and tell them to fix that one :P

Share this post


Link to post
Share on other sites

This can be done with a legacy search, which is then exportable.  Screen cap:

image.png.e8023e1bab37cefe3209ed53e871f3ff.png

The * tells the system to treat the value field as raw SQL so you can type anything you want there.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...