CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • searching contribs for single day
Pages: [1]

Author Topic: searching contribs for single day  (Read 837 times)

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
searching contribs for single day
August 31, 2010, 08:14:04 am
just ran into an interesting one for a client.
they want to do a contrib search for records on a single day via find contributions. so for date received they put the same date -- e.g. 7/20/10

however, the query that is built is: 2010-07-20 00:00:00 to 2010-07-20 00:00:00
which only retrieves contribs entered through the backend admin side -- because they don't have a timestamp

if a contrib was received via a contrib form at 2010-07-20 08:00:00 -- it is not included in the result list
if the criteria is changed to 2010-07-20 00:00:00 to 2010-07-21 00:00:00 -- it returns backend contribs for the following day as well -- i.e. they're not getting their "single day"

taking a look at the query right now, as the timestamp should be stripped from the criteria. but just curious if others ran into this.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: searching contribs for single day
August 31, 2010, 05:28:34 pm
your putting the same date in To and From?
or 'date required' in 'from' and day following date required in 'to'?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: searching contribs for single day
August 31, 2010, 06:27:57 pm
same date in both. it is a bug. worked with Lobo on it today, so it should make it in the next revision I expect.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: searching contribs for single day
August 31, 2010, 06:34:01 pm
so doesn't "'date required' in 'from' and day following date required in 'to'" give the necessary result?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: searching contribs for single day
August 31, 2010, 06:42:21 pm
no --

if the criteria is changed to 2010-07-20 00:00:00 to 2010-07-21 00:00:00 -- it returns backend contribs for the following day as well -- i.e. they're not getting their "single day"

e.g. it returns contribs timestamped for BOTH 2010-07-20 00:00:00 and 2010-07-21 00:00:00

the query values should default to:
2010-07-20 00:00:00 to 2010-07-20 23:59:59
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • searching contribs for single day

This forum was archived on 2017-11-26.