Description
While using cosmos database we generally use LINQ to do all the comparison. But, in some cases we need the data to be filtered in using the NOSQL query only.
In cosmos we need to compare the dates in a particular format yyyy-MM-ddTHH:mm:ss.fffffffZ
Example
SELECT * FROM c WHERE (c["CreatedOn"] >= "2024-02-19T23:14:25.7251173Z")
OR
SELECT * FROM c WHERE c.CreatedOn >= "2024-02-19T23:14:25.7251173Z"
Here the key point is the format of the date string(yyyy-MM-ddTHH:mm:ss.fffffffZ) which we have to compare.