Summation of two Times

Hello all, I want to get sum of two different Times (v1 + v2) , and to put that value in variable. How is that possible? Thanks in advance.
rt

Hi @bp777
Yes.
NewStrVar = TimeSpan.parse(v1).add(TimeSpan.parse(V2)). ToString

Hope this will work for you.
Thanks!

1 Like

@bp777

first Split using ā€œ+ā€ as delimiter store in array
then split using ā€œ:ā€ as delimiter
Concatenate into V1 and V2 and add them

Use @Deepak94 solution it is very easy

@Deepak94 that looks very nice, but Iā€™m getting error : Assign: String was not recognized as a valid TimeSpan.
test
Even though variable testara is of type String

Hi @bp777
Have you added .ToString at the end ?

Also Make sure that V1 and V2 should be in this format 00:00:00
Thanks!

Yes I did @Deepak94

@Deepak94
of which type do v1 and v2 need to be before TimeSpan.Parse?

@bp777
String should be fine.

Thanks!