[ https://issues.apache.org/jira/browse/HIVE-3378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13433901#comment-13433901 ]
Sanam Naz commented on HIVE-3378: --------------------------------- Ignore the previous comment : Functionality what we need is Returns the numeric day of an year. Case 1: hive> SELECT DAYOFYEAR('2010-10-12') FROM TABLE_NAME; -> 285 Case 2:hive>SELECT * FROM TABLE_NAME WHERE DAYOFYEAR (date) =286 date|product_id|unit|price|value 2010-10-12 14:52:22|110023|35|5.00|175.00 2011-02-18 21:13:11|112345|40|10.00|400.00 2010-10-13 18:15:54|110045|25|25.00|625.00 1989-04-21 00:12:23|115678|10|3.00|30.00 2004-12-31 01:45:10|110987|5|20.00|100.00 Output: 2010-10-13 18:15:54|110045|25|25.00|625.00 > UDF to obtain the numeric day of an year from date or timestamp in > HIVE. > ---------------------------------------------------------------------------- > > Key: HIVE-3378 > URL: https://issues.apache.org/jira/browse/HIVE-3378 > Project: Hive > Issue Type: Bug > Components: UDF > Affects Versions: 0.8.1, 0.9.0 > Reporter: Deepti Antony > Fix For: 0.9.1 > > > Hive current releases lacks a function which returns the numeric day of an > year if a date or timestamp is given .The function DAYOFYEAR(date) would > return the numeric day from a date / timestamp or which would be useful > while using HiveQL.DAYOFYEAR can be used to compare data with respect to > number of days till the given date.It can be used in different domains. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira