todecimal()

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

Converts the input to a decimal number representation.

Note

When possible, use decimal literals instead.

Syntax

todecimal(value)

Learn more about syntax conventions.

Parameters

Name Type Required Description
value scalar ✔️ The value to convert to a decimal.

Returns

If conversion is successful, result is a decimal number. If conversion isn't successful, result is null.

Example

The following example checks if the result of converting the input "123.45678" is equal to the decimal 123.45678.

print todecimal("123.45678") == decimal(123.45678)

Output

print_0
true