hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashish Thusoo <athu...@qubole.com>
Subject Re: date format question
Date Mon, 17 Sep 2012 21:17:26 GMT
You could use the unix_timestamp function ...

unix_timestamp(ts, <pattern>) >= unix_timestamp("2012-09-10", 'yyyy-MM-dd')
...

something on those lines

Also checkout
https://cwiki.apache.org/Hive/languagemanual-udf.html#LanguageManualUDF-DateFunctions

for more datetime functions in Hive.

Ashish

On Mon, Sep 17, 2012 at 2:07 PM, zuohua zhang <zuohua@gmail.com> wrote:

> I have a date column in this format:
> Mon Jul 16 14:05:12 PDT 2012
>
> I want to select all records > 2012-09-01.
>
> How to do?
>
> Thanks!
>

Mime
View raw message