How to get running time of Workflow in UiPath?

Hello All… i need help for how to get running time of workflow in UiPath and take it to a file.txt


You have to create two variable as below
startTime - TimeSpan type variable
endTime - TimeSpan type variable

  • Then get start time while starting the workflow System.DateTime.Now.TimeOfDay into the startTime variable using Assign activity

  • At end of the workflow get endTime using assign activity like this System.DateTime.Now.TimeOfDay.Subtract(startTime)

  • Now you will get the actual time it is executed


how to only get this into seconds “04.180 s” ?

To convert it to total seconds with three decimals (rounded up):

String.Format("{0:N3} s", endTime.TotalSeconds)

Thankyou @sarathi125 and @ptrobot

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.