Redigera

Dela via


convert_mass

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

Convert a mass value from one unit to another.

Syntax

convert_mass(value,from,to)

Learn more about syntax conventions.

Parameters

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. Invalid units return null.

Example

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

Output

result
2.64554714621853