hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manish Rangari <linuxtricksfordev...@gmail.com>
Subject Re: Extracting data from ELB log date format
Date Thu, 22 Sep 2016 07:16:25 GMT
Thanks Nichole and Dudu for the reply. I got what I was looking for.

--Manish

On Thu, Sep 22, 2016 at 2:52 AM, Markovitz, Dudu <dmarkovitz@paypal.com>
wrote:

> select to_date(ts),year(ts),month(ts),day(ts),hour(ts),minute(ts),second(ts)
> from (select from_unixtime (unix_timestamp ('2016-09-15T23:45:22.943762Z',"yyyy-MM-dd'T'HH:mm:ss"))
> as ts) as t;
>
> OK
>
> 2016-09-15 2016 9    15   23   45   22
>
>
>
> Dudu
>
>
>
> *From:* Manish Rangari [mailto:linuxtricksfordevops@gmail.com]
> *Sent:* Wednesday, September 21, 2016 4:23 PM
> *To:* user@hive.apache.org
> *Subject:* Extracting data from ELB log date format
>
>
>
> Guys,
>
>
>
> I am trying to extract date, time, month, minute etc from below timestamp
> format but did not find any function for this. Can anyone help me to
> extract the details?
>
>
>
> 2016-09-15T23:45:22.943762Z
>
> 2016-09-15T23:45:22.948829Z
>
>
>
> --Manish
>

Mime
View raw message