Format time when returning query results.