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

Switch to Threaded View
Hive >> mail # user >> date format question


Copy link to this message
-
Re: date format question
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 <[EMAIL PROTECTED]> 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!
>