ParseCurrency

Parses a currency value in to a numeric using the specified or context locale

Method Signature

ParseCurrency(string=[string], locale=[string])

Arguments

Argument
Type
Required
Description
Default

string

string

true

the value to be parsed

locale

string

false

the optional locale to apply in parsing

Examples

lsParseCurrency Example

LSParseCurrency converts a locale-specific currency string to a number.

Run Example

lsParseCurrency( "$120.50" );

Result: 120.5

Additional Examples

<bx:output>
	#LSParseCurrency( 4.5 )#<br>
	#LSParseCurrency( "$4.50" )#<br>
	#LSParseCurrency( "£4.50", "English (UK)" )#
</bx:output>

Last updated

Was this helpful?