title: Convert date from string to date type in Hive
body: <p>I want to change string which is in format '29-MAR-17' to date type in Hive. The column in question is named "open_time".</p>
  
  <p>I have tried using:</p>
  
  <pre><code>SELECT TO_DATE(from_unixtime(UNIX_TIMESTAMP('open_time', 'dd/MM/yyyy')));
  </code></pre>
  
  <p>But it returns NULL. Subsequently, my objectif is to do something like this : </p>
  
  <pre><code>SELECT * FROM table_hive WHERE open_time BETWEEN '29-MAR-17' AND '28-MAR-17';
  </code></pre>
  
  <p>With strings, it will definitely not work.
  Any help please ?</p>