Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP Cluster-mode documentation.

Cmdlet: ConvertTo-DateTime


NAME
ConvertTo-DateTime

SYNOPSIS
Convert unix time (as supplied by Data ONTAP) to a .NET DateTime struct.

SYNTAX
ConvertTo-DateTime [-Seconds] <Int64> [<CommonParameters>]


DESCRIPTION
Convert unix time (as supplied by Data ONTAP) to a .NET DateTime struct.


PARAMETERS
-Seconds <Int64>
Seconds since January 1, 1970. Most time values reported by Data ONTAP
are in this format.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
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



OUTPUTS
System.DateTime


NOTES


Category: toolkit

-------------- Example 1 --------------

C:\PS>Get-NaSnapshot vol0 | ft Name,@{Name="AccessTime";Expression={ConvertT
o-
DateTime $_.AccessTime}}


Get the snapshots for volume 'vol0' and convert the access time to a DateTim
e value.


Name AccessTime
---- ----------
weekly.0 6/14/2010 4:00:32 AM
benson(0118045471)_vol0_svq-src.0 6/3/2010 9:14:47 PM
hourly.0 2/12/2009 12:00:16 PM
hourly.1 2/12/2009 8:00:15 AM
nightly.0 2/12/2009 12:00:16 AM
hourly.2 2/11/2009 8:00:16 PM
hourly.3 2/11/2009 4:00:16 PM
hourly.4 2/11/2009 12:00:16 PM
hourly.5 2/11/2009 8:00:16 AM
nightly.1 2/11/2009 12:00:31 AM



RELATED LINKS







 Data ONTAP® PowerShell Toolkit