convert_mass

Convert a mass value from one unit to another.

Syntax

convert_mass(value,from,to)

Arguments

Name Type Required Description
value real The value to be converted.
from string The unit to convert from. For possible values, see Conversion units.
to string The unit to convert to. For possible values, see Conversion units.

Conversion units

  • Centigram
  • Decagram
  • Decigram
  • EarthMass
  • Grain
  • Gram
  • Hectogram
  • Kilogram
  • Kilopound
  • Kilotonne
  • LongHundredweight
  • LongTon
  • Megapound
  • Megatonne
  • Microgram
  • Milligram
  • Nanogram
  • Ounce
  • Pound
  • ShortHundredweight
  • ShortTon
  • Slug
  • SolarMass
  • Stone
  • Tonne

Returns

Returns the input value converted from one mass unit to another.

Examples

[Click to run query]

print result = convert_mass(1.2, 'Kilogram', 'Pound')
result
2.64554714621853