Forum Discussion
Surya2023
Jun 30, 2022Copper Contributor
Round to Specific Decimal Place not working
Hello Team, Need a suggestion below script, infact is working fine , ******************** ********* ********** *************** ************************ ##Mention the path to search the f...
LainRobertson
Jun 30, 2022Silver Contributor
That suggests the locale within your PowerShell session isn't what you expect it to be.
You can check the setting via either of the following commands and then cross-reference the returned codes with the default separator for that language. You'll probably find it's the comma rather than the period.
# Example 1
$Host.CurrentCulture;
# Example 2
Get-WinUserLanguageList;
Edited to add information:
Turns out I just learnt the PowerShell variable actually stores the exact result I was suggesting checking.
# List the current decimal place separator.
$Host.CurrentCulture.NumberFormat.CurrencyDecimalSeparator;
Cheers,
Lain