title: ACF compare dates from wordpress query
body: <p>I have an ACF custom field with text as type but it stores date (string format), I have to search all custom post type between two dates and I don't know how to handle this.</p>
  
  <pre><code>$query = array(
      'key' =&gt; 'registration_date',
      'value' =&gt; array($startDate, $endDate),
      'compare' =&gt; 'BETWEEN',
      'type' =&gt; 'date'
  );
  </code></pre>
  
  <p>Is not working because custom field value is a string format and comparison is not possible.
  How can i search post type between $startDate and $endDate then?</p>
  
  <p>Thanks for your help</p>