I want to retract objects within the dates
Here are all the objects:
And here is the query:
However, if I change the last date to ‘2020-10-10’ everything works
Advertisement
Answer
What is the data type of the column StartDateTime? If it’s datetime, your where clause needs to look like this
WHERE StartDateTime Between Convert(datetime, '2020-09-01', 120) And Convert(datetime, '2020-10-01', 120)