Database

[{"key":ISODate("2020-01-01T01:10:00Z")}]

Query

db.collection.aggregate([{$group:{_id:{hour:{"$hour":{date:"$key",timezone:"+0530"}}}}},{$project:{"hour":{"$cond":[{"$lte":["$_id.hour",9]},{"$concat":["0",{"$toString":"$_id.hour"}]},{"$toString":"$_id.hour"}]}}}])

Result