Hi,

how I can import multiple values ​​from a cck date field?

The values ​​are

start date

end date

Thanks.

CommentFileSizeAuthor
#3 importdatemodule.zip803 bytesJv2012
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sorin Sarca’s picture

Here you have an example: http://drupal.org/node/1442500#comment-5700756
What you have to do is to create a function which returns an object with desired properties:

function MY_MODULE_to_date($start, $end) {
  return (object) array(
    'start date' => $start,
    'end date' => $end,
  );
}
Jv2012’s picture

Thanks,

i will try it

Jv2012’s picture

FileSize
803 bytes

I've tried it, but I do not know how to do it

My issue is the same, I have a stardate and enddate field

1. I have created a module to import the date (importdatemodule)
2. I have enabled it
3. Field Xpath (stardate | endate)
4. Filter (convert_to_date_field)
5. Run Feed Import

but does not work

I would fix it, because I think this module is very interesting

Thanks.

Sorin Sarca’s picture

I think you have other xpath's, please post your xml structure (the one you want to import) so I can help you.

Jv2012’s picture

This is my structure

<nodes>
    <node>
      <Nid>1</Nid>
      <title>title node 1</title>
      <startdate>1335564000 </startdate>
      <enddate>1335650400</enddate>
   </node>
</nodes>
Sorin Sarca’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)