[
https://issues.apache.org/jira/browse/HIVE-9520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14301787#comment-14301787
]
Alexander Pivovarov commented on HIVE-9520:
-------------------------------------------
next_day allows to get next Fri
{code}
next_day('2015-02-02', 'Fri') = '2015-02-06'
{code}
How to get next Fri using date_add?
{code}
date_add('2015-02-02', 1) = '2015-02-03' which is Tuesday
{code}
> Create NEXT_DAY UDF
> -------------------
>
> Key: HIVE-9520
> URL: https://issues.apache.org/jira/browse/HIVE-9520
> Project: Hive
> Issue Type: Task
> Reporter: Alexander Pivovarov
> Assignee: Alexander Pivovarov
> Attachments: HIVE-9520.1.patch
>
>
> NEXT_DAY returns the date of the first weekday named by char that is later
> than the date date
> Example:
> {code}
> select next_day('2001-02-02','TUESDAY') ...;
> OK
> 2001-02-06
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)