How detect format of date field in form alter? How can I find if a form has date/time field or not and if it has, how can I detect what is date format for it?
For the Date popup selector, the #date_format element in the form element. For example:

    //The date field has the format of "d-m-Y"
    $form['date_field'] = array(
      '#type' =&gt; 'date_select',
      '#title' =&gt; t('My Date'),
      '#date_format' =&gt; 'd-m-Y',
      '#date_label_position' =&gt; 'within',
      '#date_year_range' =&gt; '0:+1',
      '#description' =&gt; t('This is a test date picker'),
      '#default_value' =&gt; date('Y-m-d H:i:s'),
    );


There's an D6 documentation page on d.o, but it's still valid for D7 last I looked.