How do i search and query based on time?

Here is what am using to return all documents in the collection

collection.Find(context.Background(), filter, options.Find().SetProjection(option))

using GitHub - mongodb/mongo-go-driver: The Official Golang driver for MongoDB

So will have to modify to use your query format