API Reference > imodeljs-Quantity > Quantity > Formatter > formatQuantity formatQuantity MethodStatic Format a quantity value into a single text string based on the current format specification of this class. formatQuantity(magnitude: number, spec: FormatterSpec): string Parameter Type Description magnitude number defines the value to spec.format. spec FormatterSpec A FormatterSpec object the defines specification for the magnitude and unit conversions for the formatter. Returns - string Defined in quantity/src/Formatter/Formatter.ts Line 347 Last Updated: 11 June, 2024