DTime variables are DateTime type GV variable is GenericValue type
Please don’t provide me any workflow files, I can’t open it on this computer.
Also I’m working on UIPath 2021.10.5 and I can’t update it because of my company policy.
I am assuming you are using Write Cell Activity to write the Total Duration to Excel cell ?
But could you also provide details of the data types of the variables used ? And Let us know how is the format of Total Duration (Total Days or Total Hours or Total Minutes) in the Excel.
To make it simple I just want to store the duration time of the RPA in Excel using WriteCell activity.
But I also expect that, each time I’m running the RPA, the duration will be adding to the last one already stored in Excel.
So far I’m able to calcule the duration of the RPA execution using TimeSpan with the following format : “HH:mm:ss”
but I don’t know how to add this duration to the one contained in Excel
(same format)
and I don’t know neither what to do if the total duration is above 24h.
We could use the format specifier "g" to convert into the format that is required. For Removing the Milliseconds we can perform a Split based on . and take only the first split.
Thanks a lot for this last message @supermanPunch, It’s very usefull.
When I remove the .AddDay and AddMiniSecond everything seams working well.
But I still have some questions please :
After this process the RPA write the value in Excel with the following format : d:h:mm:ss
this format is ok for me so far, unfortunately I have to calculate the sum of the results obtained by the RPA using an excel formula that does not seem to recognize this format.
the formula is just : C1 + C2 + Cx
where Cx is using the “Time” type, so the format : hh:mm:ss
Here is a screenshot of my column.
Each row is the result of the RPA for differents teams.
The formula is not working because of the format of the first row.
other rows are empy so far so the format is still the normal one but they are exactly in the same situation of the first row.
Current formula is : =SUM(Value(C1);Value(C2);Value(Cx))
I am not so sure, if the Excel could be able to compute the sum of those type of values. Could you let us know what is the Format of the values ? General or Date or ?
We could perform the Computation if we have/retrieve the values to the Studio. Maybe using Read Range Activity to get the Data as a Datatable, then computing the Total Duration of values present in that column and then using this Total value to Write to the Appropriate Cell using Write Cell Activity.