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.
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)
Hi Lal Babu,
Here you go with the data. It gives the same results if I use TimeEQ instead of TimeNE.
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.
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.
Retrieving data ...