Page 1 of 1

Find Events that happen overnight

Posted: Tue Dec 06, 2022 9:48 am
by FSAB
I'm trying to build a background filter that catches small events overnight such as camera IR and lighting changes that get around my preclusive filters, but I can't work out how to find events within a time period of (for example) 9PM and 5AM, across all days.

Setting a Start Time >= 21:00:00 and End Time <= 05:00:00 doesn't work, so does anyone have any ideas?

Re: Find Events that happen overnight

Posted: Tue Dec 06, 2022 1:32 pm
by Magic919
Try those with -15 hour and -7 hour. (tweak to suit.)

Re: Find Events that happen overnight

Posted: Tue Dec 06, 2022 6:27 pm
by mikb
FSAB wrote: Tue Dec 06, 2022 9:48 am I'm trying to build a background filter that catches small events overnight such as camera IR and lighting changes that get around my preclusive filters, but I can't work out how to find events within a time period of (for example) 9PM and 5AM, across all days.

Setting a Start Time >= 21:00:00 and End Time <= 05:00:00 doesn't work, so does anyone have any ideas?
I suspect you've fallen into a "common sense English" vs "logic English" trap there.

There *is* no time of day that is more than 21:00 AND less than 05:00 :)

Name a number more than 21, but less than 5 ?

You might get away with Start Time >= 21:00:00 OR End Time <= 05:00:00 -- if it will let you do that -- that's logical (even though it won't accumlate overnight in the way you might intend -- 5 early hours of THIS morning, and 3 of THIS evening, missing out the day in the middle).

Re: Find Events that happen overnight

Posted: Thu Dec 08, 2022 4:10 pm
by haus
I have a filter like this.

( End Time - Less Than - 5:00:00
OR End Time - Greater Than - 23:00:00 )
AND End Date/Time - Greater Than - 24 hours ago
AND Cause - Not Equal To - Continuous
AND (Monitor Name - equal to - A
OR Monitor Name - equal to - B )
etc - I have one line for each outdoor camera

The first three lines are most relevant but I added the rest in case it helps.

Re: Find Events that happen overnight

Posted: Mon Dec 12, 2022 10:42 am
by FSAB
mikb wrote: Tue Dec 06, 2022 6:27 pm I suspect you've fallen into a "common sense English" vs "logic English" trap there.

There *is* no time of day that is more than 21:00 AND less than 05:00 :)

Name a number more than 21, but less than 5 ?

You might get away with Start Time >= 21:00:00 OR End Time <= 05:00:00 -- if it will let you do that -- that's logical (even though it won't accumlate overnight in the way you might intend -- 5 early hours of THIS morning, and 3 of THIS evening, missing out the day in the middle).
I'm perfectly aware of how timestamps work :P

I just assumed ZM either stored actual dates and times against events *or* did some processing of filter queries that looked at separate time and date values because said options were available in the search filters.

Re: Find Events that happen overnight

Posted: Mon Dec 12, 2022 10:48 am
by FSAB
haus wrote: Thu Dec 08, 2022 4:10 pm I have a filter like this.

( End Time - Less Than - 5:00:00
OR End Time - Greater Than - 23:00:00 )
AND End Date/Time - Greater Than - 24 hours ago
AND Cause - Not Equal To - Continuous
AND (Monitor Name - equal to - A
OR Monitor Name - equal to - B )
etc - I have one line for each outdoor camera

The first three lines are most relevant but I added the rest in case it helps.
Excellent, it was this bit that worked - not sure why I didn't think of it before! :)

Code: Select all

( End Time - Less Than - 5:00:00
OR End Time - Greater Than - 23:00:00 )

Re: Find Events that happen overnight

Posted: Mon Jun 26, 2023 7:38 am
by heathcote
When it comes to time stamps, I'm an expert.

I'm assuming that ZM either maintains the precise time and date of the event, or processes the filter query by inspecting each individual date and time value, as detailed in the Find Filters interface.