Move Arrow after checking comparing times

Hi experts , I need help
Say I have three different times (hour:minute format) (recorded already)
Time1, Time2, Time3

I want the arrow to stay beside one of them so long as it's before the later time
I want to tell the arrow stay on time1 for example unless the current time has reached Time2
and stay on time2 unless the time has reached Time3 ...etc

I tried but I couldn't use the right blocks I guess

Any suggestions/idea

time_move.aia (32.9 KB)

I found some hints here:

What do you want to happen when one of the set times is reached? For the arrow to remain on that set time until the next time is reached, or something else ?

1 Like

Thank you for getting back to me
Yes exactly ....
For the arrow to remain on that set time until the next time is reached

Try this
time_move_revised.aia (34.5 KB)

Not quite sure what will happen in the the hours after midnight

1 Like

Thank you so much for the try
It's interesting to use "compare text" way
However , unfortunately didn't work accurately with times :slightly_frowning_face:

1

As you may notice the arrow was supposed to remain at 20:00:00 but it jumped to 22:00:00
I changed the set times (time1, time2,time3) to make sure it will work properly

I saw some topics where some respectful members used (Milis) to convert time into number and compare
But I am not sure how to do so

time_move_revised_1.aia (34.5 KB)


I like images for this.

time_move_revised_1 (1).aia (33.7 KB)

image

1 Like

Thank you so much the contribution

That's perfect and organised
I like your ideas man
I am amazed by the way you dealt with the images too, that's amazing

However, the matter hasn't been resolved yet , as I said to @TIMAI2 , he thankfully designed something similar depending on "compare text"

Guys Compare text doesn't seem good enough for time format

In the latest idea of @ABG , say time1 was : 16:59:00 and time2 was 17:00:00 the arrow won't go beside time2 even after the current time reached 17:00:00
because compare text will see 16:69:00 is bigger than 17:00:00

That's why @TIMAI2 said: I am not sure what will happen after midnight :smiley:

Any Alternative idea?

There are many different ways to approach this. It may be better to use actual date/time instants for all the comparisons, to handle things across 24 hours. We can have a think about that....

Are the times you showed in your first post set/fixed times for the app, or will you want to be able to change these times in the app ?

Yes please I would like to make it changeable and updateable when needed

I found this !!!

Not sure how it can help in my question

Instead of 3 Labels, use 3 Time Pickers.
Then study the Clock blocks.

1 Like

I used labels, and convert times to Milis and now works


3

Thank you

I see a bug.

Wait an hour or two, and so will you.

1 Like

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