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@ptfs.com
CURRDATE() isn't a function in MySQL. Have a look here: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html CURDATE() ( with one r ) will work, I tried it. Good luck. On Wed, 2009-02-25 at 10:46 -0500, Wagner, Jane 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@ptfs.com
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel -- Michael Hafen Systems Analyst and Programmer Washington County School District Utah, USA
for Koha checkout http://koha-dev.washk12.org or git://koha-dev.washk12.org/koha
Michael - Good catch :) I didn't even see the typo :) --- Nicole C. Engard Open Source Evangelist, LibLime (888) Koha ILS (564-2457) ext. 714 nce@liblime.com AIM/Y!/Skype: nengard http://liblime.com http://blogs.liblime.com/open-sesame/ On Wed, Feb 25, 2009 at 10:55 AM, Michael Hafen <mdhafen@tech.washk12.org> wrote:
CURRDATE() isn't a function in MySQL. Have a look here:
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
CURDATE() ( with one r ) will work, I tried it.
Good luck.
On Wed, 2009-02-25 at 10:46 -0500, Wagner, Jane 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@ptfs.com
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel -- Michael Hafen Systems Analyst and Programmer Washington County School District Utah, USA
for Koha checkout http://koha-dev.washk12.org or git://koha-dev.washk12.org/koha
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
I didn't see the typo either, and I was looking right at a MySQL book when I copied the function. Thanks -- I'll give that a try. 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@ptfs.com -----Original Message----- From: Nicole Engard [mailto:nicole.engard@liblime.com] Sent: Wednesday, February 25, 2009 10:57 AM To: Michael Hafen Cc: Wagner, Jane; koha-devel@lists.koha.org Subject: Re: [Koha-devel] Using date functions in report SQL Michael - Good catch :) I didn't even see the typo :) --- Nicole C. Engard Open Source Evangelist, LibLime (888) Koha ILS (564-2457) ext. 714 nce@liblime.com AIM/Y!/Skype: nengard http://liblime.com http://blogs.liblime.com/open-sesame/ On Wed, Feb 25, 2009 at 10:55 AM, Michael Hafen <mdhafen@tech.washk12.org> wrote:
CURRDATE() isn't a function in MySQL. Have a look here:
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
CURDATE() ( with one r ) will work, I tried it.
Good luck.
On Wed, 2009-02-25 at 10:46 -0500, Wagner, Jane 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@ptfs.com
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel -- Michael Hafen Systems Analyst and Programmer Washington County School District Utah, USA
for Koha checkout http://koha-dev.washk12.org or git://koha-dev.washk12.org/koha
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
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@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@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@ptfs.com
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
participants (3)
-
Michael Hafen -
Nicole Engard -
Wagner, Jane