convert_length
Applies to: ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Convert a length value from one unit to another.
Syntax
convert_length(
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
- Angstrom
- AstronomicalUnit
- Centimeter
- Chain
- DataMile
- Decameter
- Decimeter
- DtpPica
- DtpPoint
- Fathom
- Foot
- Hand
- Hectometer
- Inch
- KilolightYear
- Kilometer
- Kiloparsec
- LightYear
- MegalightYear
- Megaparsec
- Meter
- Microinch
- Micrometer
- Mil
- Mile
- Millimeter
- Nanometer
- NauticalMile
- Parsec
- PrinterPica
- PrinterPoint
- Shackle
- SolarRadius
- Twip
- UsSurveyFoot
- Yard
Returns
Returns the input value converted from one length unit to another. Invalid units return null
.
Example
print result = convert_length(1.2, 'Meter', 'Foot')
Output
result |
---|
3.93700787401575 |