Powershell: Convert UNIX Timestamp to DateTime


simple one liner to convert an UNIX Timnestap to DataTime object.

PS D:\> $oUNIXDate=(Get-Date 01.01.1970)+([System.TimeSpan]::fromseconds(1537615930))
PS D:\> $oUNIXDate
Samstag, 22. September 2018 11:32:10


Advertisment to support michlstechblog.info

One thought on “Powershell: Convert UNIX Timestamp to DateTime”

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.