external help file | Module Name | online version | schema |
---|---|---|---|
PSDates-help.xml |
PSDates |
2.0.0 |
Calculates the time span between two dates and returns the duration in the ISO 8601 format
New-Duration -End <DateTime> -Start <DateTime> [-ProgressAction <ActionPreference>] [<CommonParameters>]
New-Duration [-Days <Int32>] [-Hours <Int32>] [-Minutes <Int32>] [-Months <Int32>] [-ProgressAction <ActionPreference>] [-Seconds <Int32>] [-Years <Int32>] [<CommonParameters>]
New-Duration [-ProgressAction <ActionPreference>] [-Weeks <Int32>] [<CommonParameters>]
Calculates the timespan between two dates and returns the duration in the ISO 8601 format
https://en.wikipedia.org/wiki/ISO_8601#Durations
New-Duration -Start '2/3/2023' -End (Get-Date)
New-Duration -Days 1 -Hours 4
New-Duration -Weeks 3
Specifies the number for daily interval
Type: Int32
Parameter Sets: numbers
Aliases:
Accepted values:
Required: True (None) False (numbers)
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
DontShow: False
Specifies the end of a time span. End date must be greater than the start date
Type: DateTime
Parameter Sets: datetime
Aliases:
Accepted values:
Required: True (datetime) False (None)
Position: Named
Default value:
Accept pipeline input: False
Accept wildcard characters: False
DontShow: False
Specifies the number for hourly interval
Type: Int32
Parameter Sets: numbers
Aliases:
Accepted values:
Required: True (None) False (numbers)
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
DontShow: False
Specifies the number for minute interval
Type: Int32
Parameter Sets: numbers
Aliases:
Accepted values:
Required: True (None) False (numbers)
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
DontShow: False
Specifies the number for monthly interval
Type: Int32
Parameter Sets: numbers
Aliases:
Accepted values:
Required: True (None) False (numbers)
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
DontShow: False
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Accepted values:
Required: True (None) False (All)
Position: Named
Default value:
Accept pipeline input: False
Accept wildcard characters: False
DontShow: False
Specifies the number for second interval
Type: Int32
Parameter Sets: numbers
Aliases:
Accepted values:
Required: True (None) False (numbers)
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
DontShow: False
Specifies the start of a time span.
Type: DateTime
Parameter Sets: datetime
Aliases:
Accepted values:
Required: True (datetime) False (None)
Position: Named
Default value:
Accept pipeline input: False
Accept wildcard characters: False
DontShow: False
Specifies the number for weekly interval
Type: Int32
Parameter Sets: week
Aliases:
Accepted values:
Required: True (None) False (week)
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
DontShow: False
Specifies the number for yearly interval
Type: Int32
Parameter Sets: numbers
Aliases:
Accepted values:
Required: True (None) False (numbers)
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
DontShow: 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.
Fill Related Links Here