>

ParseIntOrDefault

Description

Attempts to convert a string representation of a number to an integer numeric equivalent. If successful, returns the string as an integer numeric value, otherwise returns the default value.

Syntax

ParseIntOrDefault(string_expression, default_value)

Arguments

   string_expression - string

  default_value - integer

Examples

ParseIntOrDefault(string1,42) Using string1 as input

ParseIntOrDefault('2015',42) Will output: "2015"

ParseIntOrDefault('School',42) Will output: "42"

Return value datatype

Int

Impact of null value

If input is null, returns null.