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

Switch to Plain View
Hive, mail # user - to find the 1st day of the month in hive


+
yogesh dhari 2013-12-24, 10:18
Copy link to this message
-
Re: to find the 1st day of the month in hive
yogesh dhari 2013-12-24, 10:55
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
>