hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Mackles <pmack...@adobe.com>
Subject Re: Converting Timestamp to Date omly
Date Wed, 18 Jul 2012 20:14:49 GMT
That timestamp is in millseconds but the hive date functions expect seconds. Try dividing by
1000 first.

From: Raihan Jamal <jamalraihan@gmail.com<mailto:jamalraihan@gmail.com>>
Reply-To: "user@hive.apache.org<mailto:user@hive.apache.org>" <user@hive.apache.org<mailto:user@hive.apache.org>>
To: "user@hive.apache.org<mailto:user@hive.apache.org>" <user@hive.apache.org<mailto:user@hive.apache.org>>
Subject: Converting Timestamp to Date omly

This is the Timestamp 1338674299000

When I tried converting the above timestamp into the date only.
I got this below result for date by using this syntax-  to_date(from_unixtime(cast(prod_and_ts.timestamps
as BIGINT)))

44390-11-25


Anything wrong I am doing in my syntax?


Raihan Jamal


Mime
View raw message