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 >> to find the 1st day of the month in hive


Copy link to this message
-
Re: to find the 1st day of the month in hive
Hi,
Can i use this.

select date_sub('2013-12-08', (day('2013-12-08')) -1) from table.

just want to cross chk
On Tue, Dec 24, 2013 at 3:48 PM, yogesh dhari <[EMAIL PROTECTED]> wrote:

> Hello,
>
>      I have a use case where I need to find the 1st day of the month of
> entered date.
>
>
>
> like if the date is 2013-12-05 i need to get 2013-12-01.
>
> how to do it in Hive.  (wont preffer to use UDF, like by doing some
> date_sub kind of or other function)
>
>
>
> Pls suggest
>
>
>
> Thanks
> Yogesh
>
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