hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhishek Pratap Singh <manu.i...@gmail.com>
Subject Re: Convert UTC timestamp to PST
Date Thu, 01 Dec 2011 18:28:36 GMT
hi Sonia,


Try this

SELECT from_unixtime((unix_timestamp(TXN_DATE) - 28800), 'yyyy-MM-dd
HH:MM:SS') as TXNDATE

28800 is the 8 hours difference in seconds for PDT.


~Abhishek

On Thu, Dec 1, 2011 at 10:21 AM, sonia gehlot <sonia.gehlot@gmail.com>wrote:

> Hi All,
>
> I have Unix timestamp in my table in UTC format. Is there is any inbuilt
> function to convert it into PST or PDT in YYYY-MM-DD HH:MM:SS format? I
> know there are functions like from_unixtime to convert unixtime to date
> format, but I am not sure how to convert it to PST.
>
> Thanks in advance,
>
> Sonia
>

Mime
View raw message