Filter selecting dates doesn't return expected results

Forum for questions and support relating to the 1.26.x releases only.
Locked
DrBergie
Posts: 5
Joined: Sat Nov 02, 2013 3:03 pm

Filter selecting dates doesn't return expected results

Post by DrBergie »

Hi,
I have a filter with "Date" for first option and "less than" with value -7. Sort by is set to "Date/Time" and Asc.

When I run the filter it always gives me all my events as results.

I copied the settings from a Google search to delete older events. I am running ZoneMinder version 1.26.5 on Ubuntu 14.04. The locale of the server is set to en_ZA (South African English) This might be relevant as our months are listed second, and not first. i.e. DD/MM/YYYY

Any help would be appreciated.
mikb
Posts: 604
Joined: Mon Mar 25, 2013 12:34 pm

Re: Filter selecting dates doesn't return expected results

Post by mikb »

DrBergie wrote:Hi,
I have a filter with "Date" for first option and "less than" with value -7. Sort by is set to "Date/Time" and Asc.
I *think* you have said "Older than 7 days in the future" there. Which *is* all.

If you mean "within the last 7 days" use "Date" "more than" "7 days ago"
If you mean "older than 7 days" use "Date" "less than" "7 days ago"

Yes this is the right way round, even though "within the last 7 days" and "less than 7 days ago" are the same thing IN ENGLISH, they are not the same thing to ZM's maths (a date numerically smaller than a date 7 days ago is OLDER than 7 days!)

Can you say if changing from -7 to literally "7 days ago" improves things?
DrBergie
Posts: 5
Joined: Sat Nov 02, 2013 3:03 pm

Re: Filter selecting dates doesn't return expected results

Post by DrBergie »

Thanks!
Simply changing "-7" to "7 days ago" solved my problem.
I didn't think to try and speak less Computer, and more Human to this web app, but it worked.
Locked