You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Priyanka Garg (JIRA)" <ji...@apache.org> on 2016/09/30 10:00:29 UTC

[jira] [Created] (SPARK-17743) To add a new expression that finds the difference between two timestamp types in terms of number of hours , minutes , seconds etc.

Priyanka Garg created SPARK-17743:
-------------------------------------

             Summary: To add a new expression that finds the difference between two timestamp types in terms of number of hours , minutes , seconds etc.
                 Key: SPARK-17743
                 URL: https://issues.apache.org/jira/browse/SPARK-17743
             Project: Spark
          Issue Type: Improvement
            Reporter: Priyanka Garg


The intention is to create a timediff expression which takes three parameters 
1. start time
2. end time
3. unit ( 'YYYY', ,"MM', "DD', 'HH', 'mm', 'ss') etc... ( not finalized as of now..)

The idea is to make it work in the same way like we have in SQL.
ELECT DATEDIFF(DAY, GETDATE(), GETDATE() + 1) AS DayDiff
SELECT DATEDIFF(MINUTE, GETDATE(), GETDATE() + 1) AS MinuteDiff
SELECT DATEDIFF(SECOND, GETDATE(), GETDATE() + 1) AS SecondDiff
SELECT DATEDIFF(WEEK, GETDATE(), GETDATE() + 1) AS WeekDiff
SELECT DATEDIFF(HOUR, GETDATE(), GETDATE() + 1) AS HourDiff




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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org