ParseIntOrDefault

Description

Attempts to convert a string representation of a number to a integer numeric equivalent. If successful, returns the string as a 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: "2012"

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

Return value datatype

Int

Impact of null value

If input is null, returns null.

Feedback and Knowledge Base