[ 
https://issues.apache.org/jira/browse/HIVE-9678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14322333#comment-14322333
 ] 

Alexander Pivovarov commented on HIVE-9678:
-------------------------------------------

That's great! I'm done with timediff development and worked on test when saw 
you message yesterday.
In addition to minus operation timediff also supports setting timezone to 
DateTimeFormatter converter to support Day Light Saving time situation.
{code}
select timediff('2015-03-08 03:30:00', '2015-03-08 00:30:00', 
'America/Los_Angeles');
02:00:00
{code}
It also supports string timestamps with timezone information (which helps, for 
example, to distinguish btw 1:30am PDT and 1:30am PST in CA on Nov 1, 2015)
{code}
select timediff('2015-11-01 01:30:00 -0800', '2015-11-01 01:30:00 -0700');
01:00:00
{code}



> create timediff UDF
> -------------------
>
>                 Key: HIVE-9678
>                 URL: https://issues.apache.org/jira/browse/HIVE-9678
>             Project: Hive
>          Issue Type: Improvement
>          Components: UDF
>            Reporter: Alexander Pivovarov
>            Assignee: Alexander Pivovarov
>
> MySQL has very useful function timediff. We should have it in Hive
> {code}
> select timediff('2015-02-12 05:09:07', '2015-02-12 01:18:20');
> OK
> 03:50:47
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to