Added string formatting options to ToQuantity