I am looking to find the downtime of my machines. All the information is being pulled from SQL views and tables. When the machines is ON it is =1. When it is off it is =0.Here is a sample of what it looks like queried. 2014-09-15 09:53:38.6730000 LimitSwitch 12014-09-15 10:17:30.7280000 LimitSwitch 0I am using Visual Studio 2013 and SQL MS 2012I want to insert a piece of code into my Stored procedure that lets me see how long it was in the 0 state. I have everything broken down into three shifts. 6:30 am....2:30 pm....and 10:30 pm. I have this stored procedure running through my Visual Studio program. I will be using DownTime for that column name. I also have a downtime column in my table in SQL.
↧