Another option is to use the "date" time function:<br><br>WHERE type= 'issue' AND date(datetime) BETWEEN '20091-06-01' AND '2009-06-30'<br><br>This seems to work.<br><br><br><div class="gmail_quote">
On Thu, Jul 9, 2009 at 1:33 PM, Nicole Engard <span dir="ltr"><<a href="mailto:nicole.engard@liblime.com">nicole.engard@liblime.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You are right, you want to make it '2009-07-01' if you want the entire<br>
month of June. Also a tip - you can do this :<br>
<br>
WHERE type= 'issue' AND datetime BETWEEN '20091-06-01' AND '2009-07-01'<br>
<br>
For examples of reports you might want to check out this page:<br>
<a href="http://wiki.koha.org/doku.php?id=sql_library" target="_blank">http://wiki.koha.org/doku.php?id=sql_library</a><br>
<br>
---<br>
<br>
Nicole C. Engard<br>
Open Source Evangelist, LibLime<br>
(888) Koha ILS (564-2457) ext. 714<br>
<a href="mailto:nce@liblime.com">nce@liblime.com</a><br>
AIM/Y!/Skype: nengard<br>
<br>
<a href="http://liblime.com" target="_blank">http://liblime.com</a><br>
<a href="http://blogs.liblime.com/open-sesame/" target="_blank">http://blogs.liblime.com/open-sesame/</a><br>
<div><div></div><div class="h5"><br>
<br>
<br>
On Thu, Jul 9, 2009 at 1:30 PM, Greg Barniskis<<a href="mailto:gregb@scls.lib.wi.us">gregb@scls.lib.wi.us</a>> wrote:<br>
><br>
> WHERE type= 'issue' AND datetime > '2009-06-01' AND datetime < '2009-06-30'<br>
><br>
> Is that right? Keeping in mind that I'm no Koha expert, much less expert<br>
> in MySQL, I could easily be wrong. But in more general db work, I was<br>
> always taught that a bare date stamp equated to a time stamp of midnight<br>
> (the start of that date).<br>
><br>
> Thus a WHERE clause of "less than date" would technically exclude<br>
> anything that was actually on that date. I was told to use<br>
><br>
> < '2009-07-01'<br>
><br>
> if I wanted to include everything up to '2009-06-30 23:59:59'.<br>
><br>
> Right? Wrong? Conditional?<br>
><br>
> --<br>
> Greg Barniskis, Computer Systems Integrator<br>
> South Central Library System (SCLS)<br>
> Library Interchange Network (LINK)<br>
> <gregb at <a href="http://scls.lib.wi.us" target="_blank">scls.lib.wi.us</a>>, (608) 266-6348<br>
> _______________________________________________<br>
> Koha mailing list<br>
> <a href="mailto:Koha@lists.katipo.co.nz">Koha@lists.katipo.co.nz</a><br>
> <a href="http://lists.katipo.co.nz/mailman/listinfo/koha" target="_blank">http://lists.katipo.co.nz/mailman/listinfo/koha</a><br>
><br>
_______________________________________________<br>
Koha mailing list<br>
<a href="mailto:Koha@lists.katipo.co.nz">Koha@lists.katipo.co.nz</a><br>
<a href="http://lists.katipo.co.nz/mailman/listinfo/koha" target="_blank">http://lists.katipo.co.nz/mailman/listinfo/koha</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-----------------<br>Beverly Church <br>Project Manager - LibLime <br>phone: 1.888.564.2457 x717 <br>email: <a href="mailto:beverly.church@liblime.com">beverly.church@liblime.com</a><br>
skype: beverlychurch<br>