SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


spls
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
spls [2019/08/09 11:30]
sjoerd
spls [2019/09/04 15:35] (current)
sjoerd
Line 702: Line 702:
  # Round down:  # Round down:
  #​$splsShareHolderDividendTaxTemp2 = [math]::​floor($splsShareHolderDividendTaxTemp)  #​$splsShareHolderDividendTaxTemp2 = [math]::​floor($splsShareHolderDividendTaxTemp)
- # No round down, but set it to two decimals¬†+ # No round down, but set it to two decimals, away from zero (https://​www.madwithpowershell.com/​2013/​10/​math-in-powershell.html)¬†
- $splsShareHolderDividendTaxTemp2 = [math]::​round($splsShareHolderDividendTaxTemp,​2)+ $splsShareHolderDividendTaxTemp2 = [math]::​round($splsShareHolderDividendTaxTemp,​2,​[system.midpointrounding]::​AwayFromZero)
  # Display as currency in dutch locale (must be kept on same line)  # Display as currency in dutch locale (must be kept on same line)
  [Threading.Thread]::​CurrentThread.CurrentCulture = '​nl-NL';​ $splsShareHolderDividendTax = "​{0:​c}"​ -f $splsShareHolderDividendTaxTemp2  [Threading.Thread]::​CurrentThread.CurrentCulture = '​nl-NL';​ $splsShareHolderDividendTax = "​{0:​c}"​ -f $splsShareHolderDividendTaxTemp2
Line 1281: Line 1281:
  
 </​code>​ </​code>​
 +
 += Resources =
 +* Powershell round down mathematical instead of statistical:​ https://​www.madwithpowershell.com/​2013/​10/​math-in-powershell.html
  
 {{tag> scripts o365 tools cloud}} {{tag> scripts o365 tools cloud}}
spls.txt · Last modified: 2019/09/04 15:35 by sjoerd