< Back

convertTo-epoch

Sun Jan 19, 2020 6:09 pm

NAME convertTo-epoch



SYNOPSIS

Convert time to epoch





SYNTAX

convertTo-epoch [[-date] <Object>] [<CommonParameters>]





DESCRIPTION

Convert time to epoch





PARAMETERS

-date <Object>



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>convertTo-epoch (get-date -date "05/24/2015 17:05")













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>convertTo-epoch (get-date -date "05/24/2015 17:05") | convertFrom-epoch













-------------------------- EXAMPLE 3 --------------------------



PS C:\\>(get-date -date "05/24/2015 17:05") | convertTo-epoch













-------------------------- EXAMPLE 4 --------------------------



PS C:\\>get-date | convertTo-epoch













-------------------------- EXAMPLE 5 --------------------------



PS C:\\>convertTo-epoch (get-date).ToUniversalTime()













-------------------------- EXAMPLE 6 --------------------------



PS C:\\>convertTo-epoch (get-date).ToUniversalTime() | convertFrom-epoch













-------------------------- EXAMPLE 7 --------------------------



PS C:\\>convertTo-epoch ((get-date).AddHours(2)















RELATED LINKS