Return timestamp when a workflow starts

Hello Ui Community valuable contributor,
I was wondering if there is a possibility to return timestamp of when a workflow starts ( it could be the first activity in the workflow) and want to assign it to a variable. I looked in the forum and there is no previous question about this.
Thank you in advance!

Hi @hmheimid,

So your goal is how much time taken by the process right?

From the starting if the process you can create and declare the start time
For example : dtStartTime= DateTime.Now()

At end of your process create and declare the ending time so the difference between those two dates is your Process time taken period.

DateTime dt = DateTime.Now
DateTime dt2 = DateTime.Now
TimeSpan ts = (dt2 - dt)


Thank you! This should work. I will give it a try!