Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

How to convert Get-Eventlog TimeGenerated value to DateTime?

$
0
0

Hello, I'm newby in the powershell.com. I'm a doubt converting next one to Date Time:

 

$Date1 = Get-EventLog -Logname "Symantec Enterprise Vault" -ComputerName $Machine -entrytype Information -After $DateA -Before $DateB | Where-Object {$_.EventID -eq '1000'} | Select-Object TimeGenerated

 

TimeGenerated

-------------

05/10/2014 01:00:06

 

How can I convert this TimeGenerated to a Datetime value?

 

[datetime]$Date1  <--- not works... :(

 

Thank you in advance.

 

Best regards.


Viewing all articles
Browse latest Browse all 6937

Trending Articles