I had a time in DT. How to add all time values

I had a time in DT. How to add all time values.
6:37 PM
12.03 PM
Total is 18:40 PM


Can you please give some more clarity…as 6:37 PM is already 18:37

And in 24 hour format you wont have AM and PM


Hi @Puneet_Singh1

Please refer the below workflow to add all time values.
6:37 PM
12:03 PM
Output: 6:40
Main.xaml (15.9 KB)

Hope it helpss!!

its not in 24 hour format
but we can do it in 24 hour format

My time is in datatable and it could be 2-5 rows.
How we can do that. in you example you are doing in array list

Hi @Puneet_Singh1
Can you share the screenshot of the datatable. I will get the solution for you.

right now dont know snap but it look like


can you try this TimeSpan.Parse(“12:03”).add(TimeSpan.Parse(“6:43”)).ToString
you can replace the values with your row values using for each

Hi @Puneet_Singh1

I have shared the workflow below for your reference. Please check and see whether it’s working fine at your side.
Main.xaml (17.3 KB)

Hope it helps!! Happy Automation

can you please provide a zip file the
above xaml was not opening in my pc


I have uploaded the zip file for reference.
Test.zip (2.0 MB)

Thanks and Regards,

Just place the ,message box inside for each loop so that for each row iteration it will displays the added time…
Thanks and Regrads

Hi @Shiva_Nikhil
Since it was asked for the total time after adding all the three time message box / Write Line should be placed outside the For each loop.


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