You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by yogesh dhari <yo...@gmail.com> on 2013/12/24 11:18:51 UTC
to find the 1st day of the month in hive
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
Re: to find the 1st day of the month in hive
Posted by yogesh dhari <yo...@gmail.com>.
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 <yo...@gmail.com> 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
>