I stored a value as a java.util.Date() in my collection, but when I query to get values between two specific dates, I end up getting values outside of the range. Here\'s my
I approach the query like this
new Document("datetime",Document.parse( "{$gte: ISODate('" + new SimpleDateFormat("yyyy-MM-dd").format(fromDate) + "'), $lte: ISODate('" + new SimpleDateFormat("yyyy-MM-dd").format(endDate) + "')}" ))