Re: Convert UTC timestamp to PST

2011-12-01 Thread Sam William
tz_database_time_zones): > -Duser.timezone=America/Los_Angeles > > Good luck! > Mark > > - Original Message - > From: "Abhishek Pratap Singh" > To: user@hive.apache.org > Sent: Thursday, December 1, 2011 1:28:36 PM > Subject: Re: Convert

Re: Convert UTC timestamp to PST

2011-12-01 Thread Abhishek Pratap Singh
Duser.timezone=America/Los_Angeles > > Good luck! > Mark > > - Original Message - > From: "Abhishek Pratap Singh" > To: user@hive.apache.org > Sent: Thursday, December 1, 2011 1:28:36 PM > Subject: Re: Convert UTC timestamp to PST > > >

Re: Convert UTC timestamp to PST

2011-12-01 Thread Mark Grover
rsday, December 1, 2011 1:28:36 PM Subject: Re: Convert UTC timestamp to PST hi Sonia, Try this SELECT from_unixtime((unix_timestamp(TXN_DATE) - 28800), '-MM-dd HH:MM:SS') as TXNDATE 28800 is the 8 hours difference in seconds for PDT. ~Abhishek On Thu, Dec 1

Re: Convert UTC timestamp to PST

2011-12-01 Thread sonia gehlot
Yes this worked. Thanks Abhishek! On Thu, Dec 1, 2011 at 10:28 AM, Abhishek Pratap Singh wrote: > hi Sonia, > > > Try this > > SELECT from_unixtime((unix_timestamp(TXN_DATE) - 28800), '-MM-dd > HH:MM:SS') as TXNDATE > > 28800 is the 8 hours difference in seconds for PDT. > > > ~Abhishek > >

Re: Convert UTC timestamp to PST

2011-12-01 Thread Abhishek Pratap Singh
hi Sonia, Try this SELECT from_unixtime((unix_timestamp(TXN_DATE) - 28800), '-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 wrote: > Hi All, > > I have Unix timestamp in my table in UTC format. Is

Convert UTC timestamp to PST

2011-12-01 Thread sonia gehlot
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 -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,