Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Converting timestamp to date format


Copy link to this message
-
Re: Converting timestamp to date format
BIGINT is 8 bytes whereas INT is 4 bytes. Timestamps are usually of "long"
type. To avoid loss of precision, I would recommend BIGINT.

On Fri, Jul 20, 2012 at 4:52 PM, Tech RJ <[EMAIL PROTECTED]> wrote:

> What is the difference between these two? Trying to convert timestamps to
> full date format. The only difference is BIGINT and INT
> *
> *
> from_unixtime(cast(prod_and_ts.timestamps as *BIGINT*))
> *
> *
> *OR*
>
> from_unixtime(cast(prod_and_ts.timestamps as *INT*))
>
>
>
> Which one should I use to get accurate result?
>
>
>
>
>
--
Swarnim