Is there any simple way to show how long a specific PID instance has been active?


3 Answers 3


Using the Powershell Get-Process cmdlet:

Get-Process | Select-Object id, starttime, name | Sort-Object id

  • 7
    interestingly - not all processes have a starttime
    – warren
    Oct 5, 2015 at 19:29
  • 10
    @warren - run it as Administrator and all services have a time. Aug 30, 2016 at 5:08
  • @Davidw, What about batch command?
    – Pacerier
    Dec 26, 2016 at 3:33
  • This won't account for the amount of time the computer was in hibernation since the process started.
    – BenVlodgi
    Dec 27, 2016 at 8:02
  • @disasteraverted I am running PowerShell ISE as administrator on a WIndows Server 2012 R2, NO, all processes do not have starttime. May 10, 2017 at 22:41


I know that Process Explorer will show this, sort of.

Get it here: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

If you run it, right click on a process and choose Properties it will show you the start time of the process (and you can click on the Threads tab there to see individual thread start times).

enter image description here

Alternatively in Process Explorer you can click View, Select Columns, choose the Process Performance tab, and choose Start Time and then it will show that column in the main window for all PIDs.

You might need to do your own math on the individual threads within that process (again the threads tab) and the current date/time to get a true "how long" answer.

  • 2
    Process Explorer solves the problem. May 27, 2015 at 2:20

In CMD you can use standard Windows Management Instrumentation Command-line (WMIC) utility to get the process start time:

wmic process where Name="<process name>" get CreationDate


wmic process where ProcessID="<PID>" get CreationDate

You'll get a datetime like this: 20201021010512.852810+180.
Format: YYYYMMDDHHMMSS.ssssss+MMM(UTC offset)

If you want a more readable representation you'd need to prep it with a script. Here I have written a little batch script for the purpose:


IF [%1]==[] (
    ECHO Prints process creation date in ISO format. 
    ECHO USAGE: %~n0 ^<PID or Process name^>
    EXIT /B 1

IF [%~x1]==[.exe] (SET type=Name) ELSE (SET type=ProcessID)

FOR /F "tokens=1,2 delims==" %%a IN ('wmic process where %type%^="%~1" get CreationDate /value') DO (
    IF [%%a]==[CreationDate] SET proc_cd=%%b

IF DEFINED proc_cd (
    ECHO %proc_cd:~0,4%-%proc_cd:~4,2%-%proc_cd:~6,2%T%proc_cd:~8,2%:%proc_cd:~10,2%:%proc_cd:~12,2%

Feed it with a PID or a process name ending with .exe and it will output when the process was started. Caveat: If there are many processes with the same name it would output the time only for the last one started.

You must log in to answer this question.