Description
Attempts to convert a string representation of a number to a floating-point numeric equivalent. If successful, returns the string as a floating point numeric value, otherwise returns the default value.
Syntax
ParseFloatOrDefault(string_expression, default_value)
Arguments
string_expression - string
default_value - float
Examples
ParseFloatOrDefault(string1,1.1f)
Using string1 as input
ParseFloatOrDefault('0.551',1.1f)
Will output: "0.551"
ParseFloatOrDefault('Testing',1.1f)
Will output "1.1"
Return value datatype
Float
Impact of null value
If input is null, returns null.