Home Search

DriveWorks Pro 21
SppConvertNumberCulture

Send Feedback

SppConvertNumberCulture

Converts a number from one specified culture to another.

Syntax

SppConvertNumberCulture([IncomingValue],[SourceCulture],[TargetCulture])

Where:

IncomingValue is the value to convert from the source culture to the target culture.

SourceCulture is the culture of the current number (for example fr-FR for French France). Will default to the current culture if left blank.

TargetCulture is the culture to convert the value to (for example en-US for English US). Will default to the current culture if left blank.

Examples

RuleResultMeaning
SppConvertNumberCulture("120.2", "en-US", "fr-FR")120,2Will return the value, initially formatted with an English number formatting to a French number formatting.
SppConvertNumberCulture("120,2", "fr-FR", "en-US" )120.2Will return the value, initially formatted with a French number formatting to an English number formatting.

SourceCulture and TargetCulture can be defined by referring to the Table of Language Culture Names from Microsoft.

Use Cases

This function can be used for two main use-cases:

  1. Converting a number imported from a localized data source in a US format in order to perform calculations in DriveWorks.
  2. Converting a number with a US formatting to the current culture in order to display it on Forms or to export it with Documents.