converts timestamp to ObjectID, useful for querying mongodb