title: Time difference in HIVE
body: <p>I am trying to find the difference between two timestamps in Hive. But the date_time field is STRING, so I need to convert it to date_time format before finding the time difference. </p>
  
  <p>This is the code I am using, but I get NULL.</p>
  
  <pre><code>   SELECT UNIX_TIMESTAMP(TO_DATE("2016-12-30 10:39:46"),'HH:MM:SS') - UNIX_TIMESTAMP(TO_DATE("2016-12-30 10:39:31"),'HH:MM:SS');
  </code></pre>
  
  <p>I would need the difference to be 15 seconds. </p>
  
  <p>Any suggestions would be great !!</p>