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

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

    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

            People

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

              Dates

                Created:
                Updated:
                Resolved: