Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Import csv with different date format




12 June 2013 at 1:40pm (Last edited: 12 June 2013 1:41pm), Community Member, 82 Posts


I have a csv file with various columns including a date column with the format MM/DD/YY. When I upload this file through Model Admin interface, all field values are saved correctly except the date field which is saved as 1969/12/31. I have extended the CsvBulkLoader class to associate csv columns with the table fields, and I have added " i18n::set_date_format('MM/dd/YYYY');" to the _config.php file, but still it accepts only this format: DD/MM/YYYY.

any help on how to import and save the date format in the csv file which is MM/DD/YY instead of the default.