API Reference > imodeljs-frontend > QuantityFormatting > QuantityFormatter > parseToQuantityValue parseToQuantityValue Method Parse input string into quantity given the ParserSpec parseToQuantityValue(inString: string, parserSpec: undefined | ParserSpec): QuantityParseResult Parameter Type Description inString string The magnitude of the quantity. parserSpec undefined | ParserSpec The parse specification the defines the expected format of the string and the conversion to the output unit. Returns - QuantityParseResult QuantityParseResult object containing either the parsed value or an error value if unsuccessful. Defined in core/frontend/src/quantity-formatting/QuantityFormatter.ts Line 757 Last Updated: 11 June, 2024