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

DATE_TRUNC_MILLIS result is incorrect as compared to N1QL.

    XMLWordPrintable

Details

    • Untriaged
    • No
    • CX Sprint 98, CX Sprint 114

    Description

      Reference: https://developer.couchbase.com/documentation/server/current/n1ql/n1ql-language-reference/datefun.html

      Query:

       SELECT DATE_TRUNC_MILLIS(1463284740000,'day') as day,      DATE_TRUNC_MILLIS(1463284740000,'month') as month,      DATE_TRUNC_MILLIS(1463284740000,'year') as year;


      Output:-
      CBAS:

      [
        {
          "day": 1463270400000,
          "month": 1462060800000,
          "year": 1451606400000
        }
      ]
      

      N1QL:

      [
        {
          "day": 1463270400000,
          "month": 1462147200000,
          "year": 1451696400000
        }
      ]
      

      Attachments

        Activity

          People

            tanzeem.ahmed Tanzeem Ahmed (Inactive)
            ritesh.agarwal Ritesh Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty