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 (Moderator: Dave Greenberg) »
  • Importing Date fields - when leading zeros are truncated - date no longer matche
Pages: [1]

Author Topic: Importing Date fields - when leading zeros are truncated - date no longer matche  (Read 8525 times)

Bob_Lem

  • Guest
Importing Date fields - when leading zeros are truncated - date no longer matche
April 30, 2007, 09:41:31 pm
Hey,

I am attempting to load a set of records which originated in Access, are being massaged in Excel and exported as CSV files prior to the Import into CiviCRM.

It seem that the Import objects and reject the records when the leading zeros are left off of dates. e.g. it will reject 2006/11/2 but will accept 2006/11/12. And I cant seem to force the 02.

Any advice would be greatly appreciated.

CiviCRM 1.7.beta.9101


Bob Lem
Philadelphia

MichaƂ Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Importing Date fields - when leading zeros are truncated - date no longer ma
May 01, 2007, 03:51:27 am
Did you try setting up the date format in excel to YYYY/MM/DD (in cell format settings)? I just tried it in Open Office and it seems to be working fine, adding leading 0 where needed.

Another thing that I sometimes do when OO/Excel fail to do what I need is using text format: start the contents of the cell with ' character and it should preserve the information that you put into in after it, so you can fix selected dates manually if there is not too many of them.

michau
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

Bob_Lem

  • Guest
Re: Importing Date fields - when leading zeros are truncated - date no longer matche
May 02, 2007, 02:00:27 pm
Hi Michau,

Thanks! I decided to brute force it for now and convert the CSV date fields to text format using '

I could not get Excel to force a true yyy-mm-dd format. I will load OO and give tha a try for future ref.

Appreciate the help with this!


Bob Lem

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Importing Date fields - when leading zeros are truncated - date no longer matche

This forum was archived on 2017-11-26.