How To Convert Milliseconds To TimeSpan In UiPath

There might be situations where we might be asked to pass time as TimeSpan rather than in Milliseconds.

Let us see how to do that…

Timespan.FromMilliseconds(int milliseconds)


Implementation using UiPath :

Let us convert 3000 Milliseconds to TimeSpan i.e. 00:00:03

Step 1:
Drag a “Delay” activity into the design panel

UiPath Milliseconds to timespan 1

Step 2:
Type the above code with 3000 in it into the “Duration” property of Delay activity.
i.e. Timespan.FromMilliseconds(300)

UiPath Milliseconds to timespan 2

Click here to download the Source Code…

Hope it has helped you…

Leave a Reply