Hello everyone,
Trying to create a report where it shows up times for an indicated date range. Also, not
sure if there is a statement where I can isolate to specified nodes. Below is what I got/found so far
but I'm sure the statements are incorrect. Thank you.
SELECT
NodeID
,Caption
,VendorIcon
,Ip_Address
,DateTime
,DateDiff(hour,Nodes.LastBoot,GetDate()) AS HoursUp
,CONVERT(VARCHAR(40), DATEDIFF(minute, Nodes.LastBoot, GETDATE())/(24*60))
+ ' days, '
+ CONVERT(VARCHAR(40), DATEDIFF(minute, Nodes.LastBoot, GETDATE())%(24*60)/60)
+ ' hours, and '
+ CONVERT(VARCHAR(40), DATEDIFF(minute, Nodes.LastBoot, GETDATE())%60)
+ ' minutes.' AS 'Time Up'
WHERE DateTime Between '2015-08-19' AND '2016-06-20'
FROM [Nodeid: 2821,2524,2625]
ORDER BY 5 DESC