<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Impala - Convert String to Timestamp in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Impala-Convert-String-to-Timestamp/m-p/281164#M209210</link>
    <description>&lt;P&gt;Thanks for the solution.&lt;/P&gt;&lt;P&gt;Could you please guide me for hive too, converting string to timestamp for the same formatted string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2019 21:38:03 GMT</pubDate>
    <dc:creator>RNN</dc:creator>
    <dc:date>2019-10-23T21:38:03Z</dc:date>
    <item>
      <title>Impala - Convert String to Timestamp</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-Convert-String-to-Timestamp/m-p/281153#M209201</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;I have an impala table column under this format,&amp;nbsp;2019-Oct-14 20:00:01.027898 as string but I want to insert in to another table as timestamp. I tried so many ways but its giving me null.&lt;/P&gt;
&lt;P&gt;Could you please guide me the easiest way to store this formatted string as timestamp in impala.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;RNN&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 20:18:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-Convert-String-to-Timestamp/m-p/281153#M209201</guid>
      <dc:creator>RNN</dc:creator>
      <dc:date>2019-10-23T20:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Impala - Convert String to Timestamp</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-Convert-String-to-Timestamp/m-p/281161#M209207</link>
      <description>&lt;LI-CODE lang="markup"&gt;[localhost:21000] default&amp;gt; select to_timestamp('2019-Oct-14 20:00:01.027898', 'yyyy-MMM-dd HH:mm:ss.SSSSSS');
Query: select to_timestamp('2019-Oct-14 20:00:01.027898', 'yyyy-MMM-dd HH:mm:ss.SSSSSS')
Query submitted at: 2019-10-23 14:08:19 (Coordinator: http://tarmstrong-box:25000)
Query progress can be monitored at: http://tarmstrong-box:25000/query_plan?query_id=0d4bd87f063c53a2:c8c5759b00000000
+----------------------------------------------------------------------------+
| to_timestamp('2019-oct-14 20:00:01.027898', 'yyyy-mmm-dd hh:mm:ss.ssssss') |
+----------------------------------------------------------------------------+
| 2019-10-14 20:00:01.027898000                                              |
+----------------------------------------------------------------------------+
Fetched 1 row(s) in 0.11s
[localhost:21000] default&amp;gt; &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The default timestamp format accepted by Impala is ISO 8601 - &lt;A href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank"&gt;https://en.wikipedia.org/wiki/ISO_8601&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to_timestamp() lets you specify a format string if you want more flexibility about input timestamp formats - &lt;A href="https://docs.cloudera.com/documentation/enterprise/latest/topics/impala_datetime_functions.html#datetime_functions__to_timestamp" target="_blank"&gt;https://docs.cloudera.com/documentation/enterprise/latest/topics/impala_datetime_functions.html#datetime_functions__to_timestamp&lt;/A&gt;. You can see above how it might work.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 21:10:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-Convert-String-to-Timestamp/m-p/281161#M209207</guid>
      <dc:creator>Tim Armstrong</dc:creator>
      <dc:date>2019-10-23T21:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Impala - Convert String to Timestamp</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-Convert-String-to-Timestamp/m-p/281164#M209210</link>
      <description>&lt;P&gt;Thanks for the solution.&lt;/P&gt;&lt;P&gt;Could you please guide me for hive too, converting string to timestamp for the same formatted string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 21:38:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-Convert-String-to-Timestamp/m-p/281164#M209210</guid>
      <dc:creator>RNN</dc:creator>
      <dc:date>2019-10-23T21:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Impala - Convert String to Timestamp</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-Convert-String-to-Timestamp/m-p/281166#M209212</link>
      <description>&lt;P&gt;I'm less familiar with hive, but I think you have to do something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select date_format(UNIX_TIMESTAMP('2019-Oct-14 20:00:01.027898', 'yyyy-MMM-dd HH:mm:ss.SSSSSS'), 'yyyy-MM-dd HH:mm:ss.SSSSSS');&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 21:51:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-Convert-String-to-Timestamp/m-p/281166#M209212</guid>
      <dc:creator>Tim Armstrong</dc:creator>
      <dc:date>2019-10-23T21:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Impala - Convert String to Timestamp</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-Convert-String-to-Timestamp/m-p/281167#M209213</link>
      <description>&lt;P&gt;Thanks for your reply, but it didn't work.&lt;/P&gt;&lt;P&gt;I tried using other functions but it brings up the date time without milliseconds.&amp;nbsp; But I want the milliseconds as well.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 22:55:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-Convert-String-to-Timestamp/m-p/281167#M209213</guid>
      <dc:creator>RNN</dc:creator>
      <dc:date>2019-10-23T22:55:26Z</dc:date>
    </item>
  </channel>
</rss>

