We have a requirement where we have to get data between two dates.
We were trying to check what would happen if the dates given were invalid.
We added a few documents with invalid dates.
Document 1 had the date : ‘2019-13-13T12:24:33.852Z’
Document 2 had the date : ‘2019-14-13T15:52:32.931Z’
Now if the N1QL is
“SELECT *
FROM TestBucket testDoc
Where testDoc.createTimestamp >= ‘2018-13-13T00:00:00.000Z’ AND testDoc.createTimestamp <= ‘2019-14-13T15:52:32.931Z’ limit 1”
we’re still getting the two documents mentioned above.
Since the date entered is invalid, how’s this data getting returned.