The values for datetime need to be in RFC3339 format. See https://docs.dgraph.io/query-language/#schema-types
I suppose you were able to input a value which is not in RFC3339 and then while indexing those values were ignored. If you value is in correct format, you can use le and ge functions to compare the dates and get records created in last hour or n seconds as well.