Page 1 of 1

Calendar file import

Posted: Fri Feb 09, 2007 4:47 pm
by reidjazz
I'm using CMSMS 1.0.4 on an Apache 2.0 webserver. I've been attempting to take a CSV file, in the format indicated on the 'Import Events' panel in the Calendar Admin. So far, I've had 'some' success, but the date seems to always default to 30 November 2005.

I'm curious if anyone has had any success importing events into the Calendar module. What i'm really attempting to do is export from my Palm Desktop software and then import into the Calendar module, eliminating the need to enter events twice.

Any ideas are most appreciated!  ;D
Todd

Re: Calendar file import

Posted: Wed Mar 28, 2007 7:13 pm
by rembert
It's easy to fix this: just edit modules/Calendar/action.admin_import.php

Line 27 should read:

Code: Select all

echo '<table border="1"><tr><td>Start time: YYYY-MM-DD hh:mm</td><td>End time: YYYY-MM-DD hh:mm</td>';
Or, in other words: ensure the date format in your CSV file matches the one in the table cms_module_calendar_events as the data is insert without any conversion or checking whatsoever. The correct format is: YYYY-MM-DD hh:mm (at least with MySQL but afaik it's the same with Postgres).

BTW: a line in the CSV file should never exceed 1000 characters - if longer, then the details will be cut-off (easy to enlarge in action.admin_import_events.php).

Re: Calendar file import

Posted: Sun Jul 01, 2007 11:12 pm
by reidjazz
Hey, thank you very much...I just came back to this post, as I'm entering a bunch of gigs to my calendar ONE AT A TIME...glad you gave me some direction...I'll let you know how it pans out.

Thanks,
reidjazz

Re: Calendar file import

Posted: Tue Aug 28, 2007 9:14 pm
by reidjazz
rembert wrote: It's easy to fix this: just edit modules/Calendar/action.admin_import.php

Line 27 should read:

Code: Select all

echo '<table border="1"><tr><td>Start time: YYYY-MM-DD hh:mm</td><td>End time: YYYY-MM-DD hh:mm</td>';
Or, in other words: ensure the date format in your CSV file matches the one in the table cms_module_calendar_events as the data is insert without any conversion or checking whatsoever. The correct format is: YYYY-MM-DD hh:mm (at least with MySQL but afaik it's the same with Postgres).
So, is there anyway to change the order of YYYY-MM-DD to DD-MM-YYYY? My Palm Desktop software spits out dates in DD-MM-YYYY, and I don't think I have any control over this.

reidjazz