4 Replies Latest reply on Feb 8, 2019 9:44 PM by jowens

    TimeNE() calculating wrong




      I have the following data - I have picked Jan 24th as an example.

      I have the following function.

      I have the following output (10 hours).

      Any clue? Is it due to Bad data?


      Any suggestions would be highly appreciated.

        • Re: TimeNE() calculating wrong

          Hi Abu Salam


          Could you please share data from 23rd Jan to 24th Jan?  Based on your data from 24th to 25th Jan it shows 24 hours on 25th Jan 12:00:00 AM.


          If you are planning to calculate run hours then would suggest you to use : Round(TimeEQ('RUN_STATUS','y','t',"RUN")/3600)

            • Re: TimeNE() calculating wrong

              Hi Lal Babu,


              Here you go with the data.  It gives the same results if I use TimeEQ instead of TimeNE.



              23-Jan-19 03:52:59Stopped
              23-Jan-19 11:43:00Stopped
              23-Jan-19 13:48:49Running
              23-Jan-19 14:33:50Stopped
              23-Jan-19 14:49:24Running
              23-Jan-19 22:39:57Running
              24-Jan-19 06:29:57Running
              24-Jan-19 08:26:14Bad
              24-Jan-19 08:28:59Running
              24-Jan-19 08:38:14Bad
              24-Jan-19 08:40:58Running
              24-Jan-19 08:56:14Bad
              24-Jan-19 08:58:59Running
              24-Jan-19 16:50:11Running
                • Re: TimeNE() calculating wrong

                  Hi Abu Salam


                  Based on the input data from 23-24th, I have considered from 23rd midnight to 24th midnight based on your expression and it shows approx 10 hours and inline with your analysis output mentioned in your post. Apologies If I have misunderstood your query.


                  TimeStampStatusRun Hours
                  3/1/19 3:52Stopped
                  23/1/19 11:43Stopped
                  23/1/19 13:48Running
                  23/1/19 14:33Stopped0:45:01
                  23/1/19 14:49Running
                  23/1/19 22:39Running
                  24/1/19 0:00Running9:10:36
                  2 of 2 people found this helpful
              • Re: TimeNE() calculating wrong

                Hi Abu Salam,


                As Lal Babu Shaik mentioned, it appears the calculation is correct. But just remember that since your calculation uses 'y' and 't' as the start and end times, which correspond to yesterday at midnight and today at midnight, the calculation output on 1/24/2019 12:00:00am is actually calculating for January 23rd, the time period of 1/23/2019 12:00:00am - 1/24/2019 12:00:00am, and this looks to be correct that the status was not "STOP" for only 10 hours.


                To know how many hours the status was not "STOP" for January 24th, you would look at the output from 1/25/2019 12:00:00am, which is 24, and this looks correct based on your data that the status was not "STOP" for that whole day.




                1 of 1 people found this helpful