[Digikam-devel] [Bug 210845] Date interval search returns nothing if you specify the same date as interval

Marco Menardi mmenaz at mail.com
Sat Oct 17 13:39:47 BST 2009


https://bugs.kde.org/show_bug.cgi?id=210845





--- Comment #5 from Marco Menardi <mmenaz mail com>  2009-10-17 14:39:46 ---
In any case, if I want the pictures of 01/01/09 AND 02/01/09, equal will not be
used and I will have just the pics of 01/01/09.
The problem is that we want to search for DATE, but a TIMESTAMP (date + time)
is stored and managed by database (I suspect, I'm not a digiKam developer).
I don't know what database digiKam uses, and if it supports only DATE type
field.
If not, and to solve a generic case, we have to set to 00.00 the starting date
time part, and to 23.59 (or 11.59pm) the end date interval.
This is also true if we thing that the Time value could be important to us.
Currently we have:
select * from imageinformation where creationdate >= '2005-10-02T00:00:00' and
creationdate <= '2005-10-02T00:00:00';
that could find only pictures created exactly ad time 00.00.00 of 2005-10-02,
that are very unlikely to exist :)
With my suggestion we will have:
select * from imageinformation where creationdate >= '2005-10-02T00:00:00' and
creationdate <= '2005-10-02T23:59:59';
that will sure find the pics created that day.
This solution work also in the interval:
select * from imageinformation where creationdate >= '2005-10-02T00:00:00' and
creationdate <= '2005-10-05T23:59:59';
finding the pictures created 02, 03, 04 and 05 October 2005
I suggest then to reopen the bug and fix this way.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list