hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay <tec...@gmail.com>
Subject Re: What's wrong with this query?
Date Tue, 10 Jul 2012 20:28:10 GMT
You need to use from_unixtime()

On Tue, Jul 10, 2012 at 1:01 PM, Raihan Jamal <jamalraihan@gmail.com> wrote:
> Here timestamps is a string and I always get NULL in the second column when
> I try to get date out of the timestamp. Anything wrong I am doing?
>
>
> select A.timestamps, to_date(A.timestamps) from
> (select user_id, prod_and_ts.product_id as product_id,
> prod_and_ts.timestamps as timestamps from testingtable2 lateral view
> explode(purchased_item) exploded_table as prod_and_ts) A;
>
>
> This is the Output I am getting always.
>
> 1004941621      NULL
> 1005268799      NULL
> 1061569397      NULL
> 1005542471      NULL
>
>
>
> Raihan Jamal
>

Mime
View raw message