You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Ashmika (JIRA)" <ji...@apache.org> on 2018/01/02 05:04:00 UTC

[jira] [Created] (IMPALA-6358) Get timestamp from Date string

Ashmika created IMPALA-6358:
-------------------------------

             Summary: Get timestamp from Date string
                 Key: IMPALA-6358
                 URL: https://issues.apache.org/jira/browse/IMPALA-6358
             Project: IMPALA
          Issue Type: Question
          Components: Backend, Frontend
    Affects Versions: Impala 2.5.4
         Environment: Impala
            Reporter: Ashmika
            Priority: Blocker


Hello,
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:
10/07/2017 02:04:01.575000000 PM

I tried to convert this in Impala through below query:
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

The result I get is 
2017-10-07 02:04:01.000000 .

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:
2017-10-07 14:04:01.000000 .

Any inputs would be helpful.

Thanks,
Vishu




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)