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

1 Like

@Ricky_Fenardo,

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

9 Likes

Screenshot_25
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)
3 Likes

Thankyou @sarathi125 and @ptrobot

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