|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: ConvertTo-FormattedNumber
NAME
ConvertTo-FormattedNumber
SYNOPSIS
Numerical formatter used in various ways by the DataONTAP module's data form
atters.
SYNTAX
ConvertTo-FormattedNumber [[-Value] <Decimal>] [[-Type] <String>] [[-NumberF
ormatString] <String>] [<CommonParameters>]
ConvertTo-FormattedNumber [[-Type] <String>] [[-NumberFormatString] <String>
] [-StringValue <String>] [<CommonParameters>]
DESCRIPTION
Numerical formatter used in various ways by the DataONTAP module's data form
atters.
This cmdlet is referenced in DataONTAP.Format.ps1xml. It accepts numerical
values and outputs them as defined by other input arguments.
PARAMETERS
-Value <Decimal>
The numerical value to be formatted as a string.
Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Type <String>
The type of formatting required. Supported types are DataSize, Count, P
ercent, RPM.
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-NumberFormatString <String>
.NET numeric formatting string, i.e. "0.0". If not supplied, the defaul
t is "0". This affects only the numerical portion of the output string.
Required? false
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-StringValue <String>
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".
INPUTS
System.Int64
OUTPUTS
System.String
NOTES
Category: toolkit
-------------- Example 1 --------------
C:\PS>ConvertTo-FormattedNumber 1024 DataSize "0.0"
Data size
1.0 KB
-------------- Example 2 --------------
C:\PS>ConvertTo-FormattedNumber 1234567 Count "0.00"
Count
1.20M
-------------- Example 3 --------------
C:\PS>ConvertTo-FormattedNumber 57.523 Percent
Percent
58%
-------------- Example 4 --------------
C:\PS>ConvertTo-FormattedNumber 15000 RPM
RPM. This is a special case that provides special handling for common disk
rotational speeds.
15k
RELATED LINKS
| Copyright © 2013 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|