I have a SQL table with JSON data. JSON has a property with value '2023-10-05T22:34:13.7944869+00:00'. In my SQL where clause if I write below code it doesn't return any records.
JSON_VALUE( myrow.Value,'$.Date')
BETWEEN '2023-10-05 00:00:00' AND '2023-10-05 23:59:59')
However if I change the date in the where clause to 6th Oct like below it returns records.
JSON_VALUE( myrow.Value,'$.Date')
BETWEEN '2023-10-05 00:00:00' AND '2023-10-06 23:59:59')
As JSON has 5th Oct date why first condition is not returning data.
1条答案
按热度按时间kxeu7u2r1#
This solved my issue.