title: Convert date string with AM PM to 24 Hour timestamp in Impala
body: <p>I am trying to convert a date string with AM/PM to timestamp in impala to check data conversion.
  My date string is as below:</p>
  
  <p>10/07/2017 02:04:01.575000000 PM</p>
  
  <p>I tried to convert this in Impala through below query:</p>
  
  <p>select from_unixtime(unix_timestamp((Y_date), "MM/dd/yyyy HH:mm:ss.SSSSSSSSS 'ZZ'"), "yyyy-MM-dd HH:mm:ss.SSSSSS 'ZZ'")  from table</p>
  
  <p>The result I get is
  2017-10-07 02:04:01.000000 .</p>
  
  <p>I only lose the AM/PM however the hour part "02" is not getting converted to timestamp value "14". I need to get below as result:</p>
  
  <p>2017-10-07 14:04:01.000000 .</p>
  
  <p>I use Impala as my interface for querying Hadoop.</p>
  
  <p>Any inputs would be helpful.</p>
  
  <p>Thanks,</p>
  
  <p>Vishu</p>