You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Harut Martirosyan <ha...@gmail.com> on 2015/03/24 08:16:15 UTC

Spark SQL: Day of month from Timestamp

Hi guys.

Basically, we had to define a UDF that does that, is there a built in
function that we can use for it?

-- 
RGRDZ Harut

Re: Spark SQL: Day of month from Timestamp

Posted by Harika Matha <ma...@gmail.com>.
You can use the functions Arush mentioned if you use HiveContext instead of
SparkContext.

On Tue, Mar 24, 2015 at 12:59 PM, Arush Kharbanda <
arush@sigmoidanalytics.com> wrote:

> Hi
>
> You can use functions like year(date),month(date)
>
> Thanks
> Arush
>
> On Tue, Mar 24, 2015 at 12:46 PM, Harut Martirosyan <
> harut.martirosyan@gmail.com> wrote:
>
>> Hi guys.
>>
>> Basically, we had to define a UDF that does that, is there a built in
>> function that we can use for it?
>>
>> --
>> RGRDZ Harut
>>
>
>
>
> --
>
> [image: Sigmoid Analytics] <http://htmlsig.com/www.sigmoidanalytics.com>
>
> *Arush Kharbanda* || Technical Teamlead
>
> arush@sigmoidanalytics.com || www.sigmoidanalytics.com
>

Re: Spark SQL: Day of month from Timestamp

Posted by Arush Kharbanda <ar...@sigmoidanalytics.com>.
Hi

You can use functions like year(date),month(date)

Thanks
Arush

On Tue, Mar 24, 2015 at 12:46 PM, Harut Martirosyan <
harut.martirosyan@gmail.com> wrote:

> Hi guys.
>
> Basically, we had to define a UDF that does that, is there a built in
> function that we can use for it?
>
> --
> RGRDZ Harut
>



-- 

[image: Sigmoid Analytics] <http://htmlsig.com/www.sigmoidanalytics.com>

*Arush Kharbanda* || Technical Teamlead

arush@sigmoidanalytics.com || www.sigmoidanalytics.com