external help file | Module Name | online version | schema |
---|---|---|---|
PSScriptTools-help.xml |
PSScriptTools |
2.0.0 |
Convert a timespan to lexical time.
ConvertTo-LexicalTimespan [-Timespan] <TimeSpan> [<CommonParameters>]
Convert a timespan into a lexical version that you can insert into an XML document.
PS C:\> ConvertTo-LexicalTimespan (New-Timespan -Days 7)
P7D
You can insert this value into an XML document where you need to represent a time-span.
Enter a timespan object
Type: TimeSpan
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/