Jump to:

23493 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Import csv with different date format

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

Page: 1
Go to End
Author Topic: 369 Views
  • sajok
    Community Member
    82 Posts

    Import csv with different date format Link to this post


    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.


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.