Date time to Date conversion

I want to display metrics based on the date range selected in the Grafana to fetch data from MongoDB.In the MongoDB the collection field is Date with format (2021-08-15T18:12:02.309+00:00) . Tried with
“${__to:date:yyyy-MM-dd HH:mm:ss}” in the Prometheus query but still no data on Grafana.Looks like the format is wrong.?