I am assuming that when you say it is not working, it is giving syntax error. I tried the exact same syntax on my local mongo db instance, it gives the syntax error with MongoDB compass which is a front end tool to connect to MongoDB directly.
I think it it does not like the letter “T” that separates the date from the time component. You can just remove it and try, it should work.
For example, in my table, I had a column create_time that I used as shown below:
{$and:[{“create_time”:{$gte:“2019-02-12 20:53:31.000”}}, {“create_time”:{$lte:“2019-02-12 20:53:31.000”}}]}
Hope this helps.