Duration between times

Let me preface this by saying I ain’t too bright, so I didn’t think this would work. I’m trying to have the duration of time from the alarm time (time picker) minus the current time. Here is my work. Any direction would be great.

Look in the Time Picker for an event block where to put your code, and for the value of the picked Instant.

The Clock Duration should be between Time Picker Instant and Clock1.Now.

1 Like

Sorry to be a bother. This doesn’t work but is it close? I’ll keep tinkering

Look in the Clock for the Duration between Instants. The block eats 2 Instants.Clock1 Duration

1 Like

Last question. I promise. It works but I would like for the duration to show in hours minutes and seconds. Is that possible?

Sorry I’m so needy

You reversed the start and end.
You also did not test.

You also did not use the tool tip of the block, which tells you how to use it.

Save the duration in a global duration variable, then look in the clock blocks for how to extract hours, mins from that.

1 Like