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 Import (Moderator: Yashodha Chaku) »
  • date format for activities
Pages: [1]

Author Topic: date format for activities  (Read 4664 times)

mac

  • I post occasionally
  • **
  • Posts: 71
  • Karma: 0
date format for activities
December 02, 2009, 10:00:15 am
I'm going slightly crazy with the import of activities since no matter what I try to do, I get the message:

Quote
Invalid value for field(s) : Activity date

Can somebody please tell me how to format the date properly? What is the date_format string?

I tried:
-) yyyy-mm-dd HH:mm (everything rejected)
-) yyyy-mm-dd hh:mm AM/PM (everything rejected)
-) mm-dd-yyyy HH:mm (everything with HH > 12 rejected)

Also, it would be really helpful if in the error message it would say what kind of format it expects so that people don't have to guess.

Thanks.
« Last Edit: December 02, 2009, 10:04:28 am by mac »

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: date format for activities
December 02, 2009, 10:10:33 pm
you might want to check import date formats specific to activity import functionality,

which are listed on very first page of import process. ( 'Date Format' w/ radio buttons. )
related url is : http://drupal.demo.civicrm.org/civicrm/import/activity&reset=1

hope this help

kiran
You Are Designed To Choose... Defined By Choice.

mac

  • I post occasionally
  • **
  • Posts: 71
  • Karma: 0
Re: date format for activities
December 03, 2009, 05:12:54 am
Quote from: kiran on December 02, 2009, 10:10:33 pm
you might want to check import date formats specific to activity import functionality,

which are listed on very first page of import process. ( 'Date Format' w/ radio buttons. )
related url is : http://drupal.demo.civicrm.org/civicrm/import/activity&reset=1
thank you, I know that. That unfortunately doesn't help though.

I'm formatting the dates exactly like it is saying, but it is rejected (without further information why!). I suspect that something is wrong with the way I format the time part, but there is no information on how the time should be formatted.

PS: Please note that "hh:mm" means that the time is formatted only with hh <= 12, which means that hours > 12 are "lost" since there is also no AM/PM, right? How am I supposed to get a time = 23:13 into the system?
« Last Edit: December 03, 2009, 06:20:53 am by mac »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: date format for activities
December 03, 2009, 03:30:24 pm
Mac - not sure what's up, but I tried a quick test using the default format and also got an error. I've filed an issue for this which you can track here:
http://issues.civicrm.org/jira/browse/CRM-5488

20071111 10:30

I also noted that we should fix the format indicator for time to be HH:mm to clarify that it's a 24 hour clock, and include something like 15:22 in the example on the screen.
Protect your investment in CiviCRM by  becoming a Member!

mac

  • I post occasionally
  • **
  • Posts: 71
  • Karma: 0
Re: date format for activities
December 07, 2009, 07:05:57 am
Thank you for filing the ticket. I just took another look, and what is not clear to me: When is this going to be fixed?

Also, I don't understand how this is only a minor bug since it basically prevents any activities to be imported (correctly) into the system.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: date format for activities
December 07, 2009, 11:46:16 am
Fix is currently in QA and will be part of the next point release of 3.0 (3.0.3). We hope to release 3.0.3 this week.
Protect your investment in CiviCRM by  becoming a Member!

mac

  • I post occasionally
  • **
  • Posts: 71
  • Karma: 0
Re: date format for activities
December 07, 2009, 12:01:02 pm
Quote from: Dave Greenberg on December 07, 2009, 11:46:16 am
Fix is currently in QA and will be part of the next point release of 3.0 (3.0.3). We hope to release 3.0.3 this week.
great, thank you for the feedback.

jimurl

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 3.4.6
  • CMS version: drupal 6.22
  • MySQL version: 5+
  • PHP version: 5+
Re: date format for activities
October 10, 2011, 11:48:19 am
This problem seems to have returned- when importing activities with a date format of yyyy-mm-dd HH:mm , the import fails with the error: Invalid value for field(s) : Activity date .

I tested and verified this on drupal.demo.civicrm.org

This issue was reported as fixed : http://issues.civicrm.org/jira/browse/CRM-5488 but perhaps was re-introduced to the code.

jim

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: date format for activities
October 10, 2011, 01:42:44 pm
Verified locally with 4.1 (trunk) code and it is definitely broken. Reopened the issue:

http://issues.civicrm.org/jira/browse/CRM-5488

If you are able to investigate and submit a patch or point to the code that's failing, that would be great.
Protect your investment in CiviCRM by  becoming a Member!

jimurl

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 3.4.6
  • CMS version: drupal 6.22
  • MySQL version: 5+
  • PHP version: 5+
Re: date format for activities
October 13, 2011, 11:51:09 am
HI Dave,

Thanks, I will try to find the root cause of the problem.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: date format for activities
October 13, 2011, 05:01:43 pm
Actually a fix was committed against that issue (for the 4.1 release). You might be able to use this diff to patch your site:
https://fisheye2.atlassian.com/viewrep/CiviCRM/trunk/CRM/Utils/Rule.php?r1=35731&r2=36655
Protect your investment in CiviCRM by  becoming a Member!

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: date format for activities
March 01, 2012, 08:03:33 pm
Dave,

That patch fixed the same issue for me. I'm currently on 4.0.7

Ken

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • date format for activities

This forum was archived on 2017-11-26.