Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-22606

DATE_RANGE_STR() requires both passed dates to be in the same format

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 4.6.2, 5.0.0
    • 4.6.0
    • query
    • None

    Description

      The function DATE_RANGE_STR() requires both date strings passed to it to be in the exact same format. This is at odds with most of the other date functions which are flexible and can handle different formats being passed to it.

      As an example, I would expect the following to work:

      SELECT DATE_RANGE_STR('2015-01-01T01:01:01', '2016-01-01', 'month')
       
      {
          "requestID": "98c0996b-d072-4ea9-958f-cc16c9aeface",
          "clientContextID": "ba4b30e4-de64-4af9-a9ac-79bc33920929",
          "signature": {
              "$1": "array"
          },
          "results": [
              {
                  "$1": null
              }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "685.455µs",
              "executionTime": "643.651µs",
              "resultCount": 1,
              "resultSize": 34
          }
      }
      

      That said, I am not sure of the best behaviour to decide which format to select as the output format for the strings in the array.

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-22606
          # Subject Branch Project Status CR V

          Activity

            People

              prasanna.gholap Prasanna Gholap [X] (Inactive)
              matt.carabine Matt Carabine (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty