Date range profile search problem
In 4.6.12 CRM/Contact/BAO/Query.php I've added this case in convertFormValues() to fix this - someone may do it more beautifully:

elseif (!empty($values) &amp;&amp; is_array($values) &amp;&amp; self::isCustomDateField($id)) {
    $from = FALSE;
    if (array_key_exists('from',$values)){
        $from = $values['from'];
        $from = CRM_Utils_Date::processDate($from);
    }
    $to = FALSE;
    if (array_key_exists('to',$values)){
        $to = $values['to'];
        $to = CRM_Utils_Date::processDate($to);
    }
    if( $from &amp;&amp; $to){
        $q = array('BETWEEN' =&gt; array($from,$to));
    } else if ($from){
        $q = array('&gt;=' =&gt; $from);
    } else if ($to){
        $q = array('&lt;=' =&gt; $to);
    }
    $params[] = array($id, '=', $q, 0, $wildcard);
}


This handles the case when the custom field is a date but the supplied $values is not a single value, but is instead an array with from and/or to values.