How can i add time duration

i am getting time from clock in format (hh:mm:ss a = 10:11:30 AM ) , and i want to add (hh:mm:ss = 01:30:20)
now i want to add these two times 10:11:30 AM + 01:30:20 = 11:41:50 AM
add_time.aia (2.0 KB)


@Gaston @Still-learning

I don’t know why you require so much precision, but here is an example of adding minutes

i am working on a app , that my app is fully based on clock components

In that case you will need to study the clock component in depth.

now i am studying the all clock components

Convert 01:30:20 into seconds using simple math, i.e.1 * 3600 + 30 * 60 + 20
Then use the AddSeconds method from the clock component

Taifun

This shouldn’t work because .FormatDateTime requires an instant (and not millis). And of course this doesn’t work in AI2 or any other AI distro.

1 Like

Sorry, I don’t understand what you mean by saying it shouldn’t work.

Exactly what I said.
But I didn’t say it doesn’t work, just that it shouldn’t work (because .FormatDateTime requires an “instant”). And strangely enough it only works with Kodular.

1 Like