title: how do i get products where expiring date today and will end tomorrow?
body: <p>how do I get products where expiring date today and will end tomorrow?</p>
  
  <p><strong>Query Here</strong></p>
  
  <pre><code>$current_date = date('d/m/y/'); 
  $future_date = strtotime($current_date, "+ 1 day");
  $today_date = strtotime($current_date);
  
  $sql = "SELECT distinct wposts.*
                  FROM $wpdb-&gt;posts wposts, $wpdb-&gt;postmeta wpostmeta
                  WHERE wposts.ID = wpostmeta.post_id
                  AND wposts.post_status = 'publish'
                  AND wposts.post_type = 'products'
                  AND  wpostmeta.meta_value =$today_date AND 
                  wpostmeta.meta_value &lt;=$future_date
                  ORDER BY wposts.post_date DESC";
  </code></pre>
  
  <p><strong>value in wpostmeta.meta_value table</strong></p>
  
  <pre><code>1520380800, 07/03/18
  </code></pre>
  
  <p><strong>Database</strong></p>
  
  <p><a href="https://i.stack.imgur.com/GTbQw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GTbQw.png" alt="enter image description here"></a></p>