I´ve been fighting this for days now and can´t seem to figure it out. I have a date field in my csv that has the following format:

01.01.2012 - 01.12.2012

It only imports the former date if I use the explode plugin with a - as a separation string or %s-%s.

I need to split this up and import to a date field with a date range setting on. I´ve applied this patch but still no go. I´ve also tried to use a unix timestamp on my content type with no results.

Since the date is only in one field my Field mappings in the Feeds settings look like this:

some_field_in_csv -> title
date_field_in_csv -> Date:start
date_field_in_csv -> Date:end

My tamper settings for date_field_in_csv looks like this:
date_field_in_csv -> date: Start, date: End

If I understand the plugin correctly it splits the string in two arrays and sets the values to the field which is a date range (an array).

True?

Comments

twistor’s picture

Status: Active » Closed (works as designed)

That's not how explode works. It only splits 01.01.2012 - 01.12.2012 into array('01.01.2012', '01.12.2012');

There's currently not a way map values onto fields like that.

Anonymous’s picture

Issue summary: View changes

I had a similar problem and this patch fixed it for me: #1819986: Add a plugin for reducing an array to a single element