What format should date (ISO date) be when using Migrate Module? I have a large amount of date rows that I'm migrating over from a legacy application to Drupal 7. My destination field is Date (ISO Format) with year, month and day selected. What format should this be in when I'm migrating it across?

I can see that it's stored as 2010-01-01T00:00:00 in the database so I'm using prepareRow() to manipulate the data like:

&lt;?php
public function prepareRow($row) {
  // DOB not migrated correctly - old = serialised array
  //    watchdog('temp', print_r($row, TRUE));
  if ($row-&gt;profile_dob) {
    $dobarray = unserialize($row-&gt;profile_dob);
    watchdog('temp', print_r($dobarray, true));
    $row-&gt;profile_dob = date('Y-m-d\T00:00:00', mktime(0, 0, 0, $dobarray['month'], $dobarray['day'], $dobarray['year']));
    watchdog('temp', print_r($row-&gt;profile_dob, true));
  }
}
?&gt;


This returns the expected format for the date however the data is not populated in the database. I've tried using 'c' as the date format as well with no luck.
For date migration, you should use Migrate Extras module. Then you will be able to remove your code from prepareRow(), and just map the date field.

Migrate Extras will take care of reading you date and parse it.

In my migration I just had to set the timezone when I was importing birth dates. 

Here's my mapping, as an example:

$this-&gt;addFieldMapping('field_birth_date', 'birthdate')-&gt;arguments(MigrateDateFieldHandler::arguments('Europe/Rome', 'Europe/Rome'));