0

Importing the .csv quoted below to create Events. The snippet further down shows the field mappings. Everything comes across correctly except the time components of Start Date and End Date, which get set to 12:00 AM of the correct date. Once I get these to work, there are another 200+ to import. Anything I should do differently to capture the correct times?

Event Type,Start Date,End Date,Title,Default Role,Is Active,Is Public,Share Social
Performance,11/15/2022 07:00,11/15/2022 14:30,BBTB,Attendee,No,No,No
Performance,11/17/2022 07:00,11/17/2022 14:30,BBTS,Attendee,No,No,No

Using extension CSV GUI Import to api v1.10, CiviCRM 5.55.1, Drupal 7.91, PHP 7.4.33, MySQL 5.7.40

Field mappings

4
  • The format i see in the DB is yyyy-mm-dd 00:00:00 - maybe unlikely but perhaps try with the seconds too
    – petednz - fuzion
    Dec 11, 2022 at 20:26
  • Appending the seconds (:00) didn't change the end result. Interesting twist to check, though! In other news, I was able to test the import in the Circle Interactive demo (demo.circle-interactive.co.uk). The result was the same, Start and End times set to midnight.
    – wil_SRQ
    Dec 12, 2022 at 12:09
  • sounds like you need to open an issue. only other quick suggestion would be an sql insert built from your csv
    – petednz - fuzion
    Dec 12, 2022 at 18:47
  • 1
    Issue github.com/eileenmcnaughton/nz.co.fuzion.csvimport/issues/55. Thanks Pete.
    – wil_SRQ
    Dec 12, 2022 at 20:30

1 Answer 1

2

Worked around this by following up on @petednz comment and sticking with the default date format. The failing imports used mm/dd/yyyy (1st snippet below). Selecting the default date format (yyyy-mm-dd) and reformatting the .csv accordingly (2nd snippet) parsed the times correctly.

Date Format selection

Reformatted data and mappings

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.