You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Ravisankar Mani <rr...@gmail.com> on 2015/06/08 06:57:09 UTC

Day of year

Hi everyone,


How to get 'day of year'  using hive query?

Could you  please provide any query regarding day of year?


Regards,

Ravisankar

Re: Day of year

Posted by Lefty Leverenz <le...@gmail.com>.
See this comment
<https://issues.apache.org/jira/browse/HIVE-3378?focusedCommentId=14501569&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14501569>
on HIVE-3378 (UDF to obtain the numeric day of an year from date or
timestamp in HIVE):

Marked the Jira as resolved because the function can be replaced by
>
>
>> date_format(date, 'D')
>
>
>> * Note date_format returns string result. If you need numeric value you
>> can cast the result to int.
>
>
date_format is documented at the end of this section of the UDFs doc:  Date
Functions
<https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-DateFunctions>
.

-- Lefty

On Sun, Jun 7, 2015 at 9:57 PM, Ravisankar Mani <rr...@gmail.com> wrote:

> Hi everyone,
>
>
> How to get 'day of year'  using hive query?
>
> Could you  please provide any query regarding day of year?
>
>
> Regards,
>
> Ravisankar
>