How to add cck custom date field? I am trying to create custom compound field with a text field and a date popup.

I've tried the following code:

 $element['year'] = array(
    '#title' =&gt; t('date'),
    '#type' =&gt; 'select',
    '#default_value' =&gt; $options['year'],
    '#options' =&gt; $options,
    '#weight' =&gt; 2,
  );


...

function _universitydegrees_values_year() {
    $options = array(
        'year',
        1970, 
        1971, 
        1972,);
    return $options;
}
In Drupal 6 we had the Multigroup module, which was bundled as part of the CCK 3.x branch. As of comment #353 on the State of the multigroup module thread, you should be able to just swap your CCK 2.x code for the 3.x branch and run the updates without no problem. I used this module a few years ago and it worked fine.

Be advised however that apparently the CCK Multigroup module migration path to D7 is undefined. i.e., if you develop your site in D6 with CCK 3.x there's no guarantee that you will be able to automatically convert your CCK data to D7.

There are other Drupal 6.x field-grouping modules metioned here that you might find worth researching. This post also talks about different grouping modules and it might interest you.