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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • 'Cannot recognize date format' in SearchBuilder
Pages: [1]

Author Topic: 'Cannot recognize date format' in SearchBuilder  (Read 34005 times)

torrance123

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 3
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.0.91
  • PHP version: 5.3.3
'Cannot recognize date format' in SearchBuilder
September 25, 2012, 08:26:00 pm
I'm using SearchBuilder to return me all contacts who have an activity (any activity will do, right now) whose date is after a certain date. I'm getting this error:

Code: [Select]
Cannot recognize for 20120816
The search is set up simply as record type = 'Activity', and then 'Activity Date' from the next menu, operator is '<', and the date is of the format '20120816'. I've also tried the date in a mysql datetime format of '2012-08-16 00:00:00', also with no luck.

The full stacktrace is here:

Code: [Select]
Sep 25 23:21:16  [info] $Fatal Error Details = Array
(
    [message] => Cannot recognize  for 20120816
    [code] =>
)


Sep 25 23:21:16  [info] $backTrace = /sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 300
/sites/all/modules/civicrm/CRM/Utils/Type.php, fatal, 221
/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php, escape, 4359
/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php, buildClause, 1909
/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php, restWhere, 1489
/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php, whereClauseSingle, 1527
/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php, whereClause, 458
/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php, initialize, 419
/sites/all/modules/civicrm/CRM/Contact/Selector.php, __construct, 215
/sites/all/modules/civicrm/CRM/Contact/Form/Search.php(924) : eval()'d code, __construct, 9
/sites/all/modules/civicrm/CRM/Contact/Form/Search.php, eval, 924
/sites/all/modules/civicrm/CRM/Contact/Form/Search/Builder.php, postProcess, 381
/sites/all/modules/civicrm/CRM/Core/Form.php, postProcess, 246
/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Refresh.php, mainProcess, 75
/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
/sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 289
/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 228
/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 500
, civicrm_invoke,
/includes/menu.inc, call_user_func_array, 516
/index.php, menu_execute_active_handler, 21

Am I doing something wrong or is this a bug? I see another person reporting a similar/same problem here: http://forum.civicrm.org/index.php?topic=24948.0

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: 'Cannot recognize date format' in SearchBuilder
September 26, 2012, 12:02:30 am
Torrance does adding 6 zeros give you the right format?

ie. 'YmdHis'
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

torrance123

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 3
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.0.91
  • PHP version: 5.3.3
Re: 'Cannot recognize date format' in SearchBuilder
September 26, 2012, 04:04:49 pm
The format "20120812000000" returns the same error:

Code: [Select]
Cannot recognize for 20120812000000

joemcl

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 1
    • Citizen Action of New York
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.34
  • MySQL version: 5.6
  • PHP version: Unsure
Re: 'Cannot recognize date format' in SearchBuilder
July 25, 2013, 03:23:13 pm
I'm doing a search in Search Builder, looking for Activity Date <= 20120725, still getting the same error Torrance reported last September. Tried adding six zeros as well (like 20120725000000), makes no difference, still fails. Has this been fixed in newer versions? We're still on 4.2.9 . Thanks.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: 'Cannot recognize date format' in SearchBuilder
July 25, 2013, 03:25:46 pm
Joe - test it on the demo site to see if it works there
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • 'Cannot recognize date format' in SearchBuilder

This forum was archived on 2017-11-26.