Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
Switch services using the Version drop-down list. Learn more about navigation.
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Converts an energy value from one unit to another.
Syntax
convert_energy(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
- BritishThermalUnit
- Calorie
- DecathermEc
- DecathermImperial
- DecathermUs
- ElectronVolt
- Erg
- FootPound
- GigabritishThermalUnit
- GigaelectronVolt
- Gigajoule
- GigawattDay
- GigawattHour
- HorsepowerHour
- Joule
- KilobritishThermalUnit
- Kilocalorie
- KiloelectronVolt
- Kilojoule
- KilowattDay
- KilowattHour
- MegabritishThermalUnit
- Megacalorie
- MegaelectronVolt
- Megajoule
- MegawattDay
- MegawattHour
- Millijoule
- TeraelectronVolt
- TerawattDay
- TerawattHour
- ThermEc
- ThermImperial
- ThermUs
- WattDay
- WattHour
Returns
Returns the input value converted from one energy unit to another. Invalid units return null.
Examples
The following example demonstrates how to use the convert_energy() function.
print result = convert_energy(1.2, 'Joule', 'BritishThermalUnit')
Output
| result |
|---|
| 0.00113738054437598 |