[Koha-devel] Using date functions in report SQL

Nicole Engard nicole.engard at liblime.com
Wed Feb 25 16:56:25 CET 2009


I haven't tried CURRDATE() - but I have used other date functions successfully:

SELECT issues.date_due FROM issues WHERE issues.date_due <
DATE_SUB(now(), INTERVAL 12 DAY) AND issues.returndate is NULL

I've also used MONTH() and YEAR() successfully.

Hope that helps.

---

Nicole C. Engard
Open Source Evangelist, LibLime
(888) Koha ILS (564-2457) ext. 714
nce at liblime.com
AIM/Y!/Skype: nengard

http://liblime.com
http://blogs.liblime.com/open-sesame/



On Wed, Feb 25, 2009 at 10:46 AM, Wagner,  Jane <jwagner at ptfs.com> wrote:
> Does anyone have some examples of using date functions like currdate()
> and month() in report SQL statements?  Is this possible in Koha reports?
> I'm not having any luck -- even a very simple
>
> select currdate()
>
> report comes back with a generic error message.
>
> Thanks.
>
> Jane Wagner
> Library Systems Analyst
> PTFS Inc.
> Content Management and Library Solutions
> 6400 Goldsboro Road, Suite 200
> Bethesda, MD  20817
> (301) 654-8088 x 151
> jwagner at ptfs.com
>
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-devel
>



More information about the Koha-devel mailing list