Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-38389

Add the `DATEDIFF` and `DATE_DIFF` aliases for `TIMESTAMPDIFF()`

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • SQL
    • None

    Description

      Introduce the datediff()/date_diff() function, which takes three arguments: unit, and two datetime expressions, i.e.,

      datediff(unit, startDatetime, endDatetime)
      

      The function can be an alias to timestampdiff().

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            maxgekk Max Gekk
            maxgekk Max Gekk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment