Last Created time in Get-VIEvent is in the [ dd/mm/yy hh:mm:ss am/pm ] (12 hrs format),
Is it possible to change it into 24 hrs format?
Thank You
How a DateTime object is displayed by PowerShell depends on your regional settings.
You can check with
Get-Culture | select -ExpandProperty DateTimeFormat
You can always force the datetime object to a specific format.
For example like this (HH indicates a 24-hour notation)
Get-VIEvent -Start (Get-Date).AddHours(-1) |
Select @{N='Timestamp';E={$_.CreatedTime.ToString("yyyyMMdd HH:mm:ss")}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
How a DateTime object is displayed by PowerShell depends on your regional settings.
You can check with
Get-Culture | select -ExpandProperty DateTimeFormat
You can always force the datetime object to a specific format.
For example like this (HH indicates a 24-hour notation)
Get-VIEvent -Start (Get-Date).AddHours(-1) |
Select @{N='Timestamp';E={$_.CreatedTime.ToString("yyyyMMdd HH:mm:ss")}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank You..
it worked