PowerShell – Convert Ticks to Time


Converting dates/times into ticks using the PowerShell Get-Date applet is simple. However, how do you do the opposite operation; converting the ticks back into a date and time?

Best Solution

Monday, January 01, 0001 12:16:40 AM

Just cast the number into a DateTime. The DateTime single-parameter constructor takes a long as number of ticks.