Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Get only the date from DateType data


Copy link to this message
-
Re: Get only the date from DateType data
string to_date(string timestamp) does the trick.

The official hive UDF page has all the useful functions that are available:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF

-Vijay

On Wed, Jul 18, 2012 at 2:55 PM, Raihan Jamal <[EMAIL PROTECTED]> wrote:
> And CREATED_TIME is string data type.
>
>
>
>
> Raihan Jamal
>
>
>
> On Wed, Jul 18, 2012 at 2:48 PM, Raihan Jamal <[EMAIL PROTECTED]> wrote:
>>
>> This is the CREATED_TIME 2009-12-14 10:15:54
>>
>> How I can get only the date part from the above created_time, just like
>> below.
>>
>> 2009-12-14
>>
>> Any suggestions will be appreciated.
>>
>>
>> Raihan Jamal
>>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB