[Koha] Problem constructing a report - WHERE dates?
ohiocore at gmail.com
Fri Jul 10 08:00:45 NZST 2009
You can also do:
WHERE YEAR(datetime) = 2009 AND MONTH(datetime) = 6
I tend to prefer that one, since it is easy to update/increment and you
don't have to remember how many days are in a given month for that specific
LibLime - Open Source Library Solutions
On Thu, Jul 9, 2009 at 1:30 PM, Greg Barniskis <gregb at scls.lib.wi.us> wrote:
> WHERE type= 'issue' AND datetime > '2009-06-01' AND datetime < '2009-06-30'
> Is that right? Keeping in mind that I'm no Koha expert, much less expert
> in MySQL, I could easily be wrong. But in more general db work, I was
> always taught that a bare date stamp equated to a time stamp of midnight
> (the start of that date).
> Thus a WHERE clause of "less than date" would technically exclude
> anything that was actually on that date. I was told to use
> < '2009-07-01'
> if I wanted to include everything up to '2009-06-30 23:59:59'.
> Right? Wrong? Conditional?
> Greg Barniskis, Computer Systems Integrator
> South Central Library System (SCLS)
> Library Interchange Network (LINK)
> <gregb at scls.lib.wi.us>, (608) 266-6348
> Koha mailing list
> Koha at lists.katipo.co.nz
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Koha