Converts a number from one specified culture to another.
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.
Rule | Result | Meaning |
---|---|---|
SppConvertNumberCulture("120.2", "en-US", "fr-FR") | 120,2 | Will return the value, initially formatted with an English number formatting to a French number formatting. |
SppConvertNumberCulture("120,2", "fr-FR", "en-US" ) | 120.2 | Will 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.
This function can be used for two main use-cases: