Looking once more for an expression regarding hours

Hi to all
In the past i asked some help to realize a watch with a +/- 1 h 2nd adjustable hour hand just to have a GMT watch. I have had as a gift this formula (#DWFKS#+(#VAR_1#*30)) that with 2 VAR points. VAR + at 3 o’c
and VAR - at 9 o’c works at his best.
Now i would realize the same thing, but with a digital dial, so that tapping at 3 i advance 1 h, and tapping at 9 i go back 1 h.
Can a pious soul tell me the correct formula i have to use? :smile:
Possibly for the 12 and 24 hours.
Thanks in advance for any help
A nice day to all
Cheers

I do not subscribe to Creator Pro so cannot test this using variables, but you could use the same principle as for the watch hands, but instead of manipulating the rotation, you manipulate the actual value.

#DH# is the tag for hour in day (0 to 23).
So your basic expression in the text field would be:
(#DH#+#VAR_1#), assuming that you have a way to set VAR_1 to plus or minus the desired number of hours.
This will work in general but you will have a problem when #DH#+#VAR_1# < 0 and also when #DH#+#VAR_1# > 23
So you will have to add some nested conditional logic.

Something like:
$#DH#+#VAR_1#<0?24+#DH#+#VAR_1#:$$#DH#+#VAR_1#>23?#DH#+#VAR_1#-24:#DH#+#VAR_1#$

Perhaps others can improve on this, or at least test that it is indeed working as intended (using variables).

Hi pal
I tried your formula $#DH#+#VAR_1#<0?24+#DH#+#VAR_1#:$$#DH#+#VAR_1#>23?#DH#+#VAR_1#-24:#DH#+#VAR_1#$ but…there is a big problam. The trick it seems to work, the hour change + or - but…minutes does not appear. Only the hour.
Now i try the simple formula and i will see.
Thx anyway for your nice help
Cheers

Hi again
I presume i committed a terrible mistake in my precedent reply. I had to add minutes tag to your formula and now i have hour and minutes. It seems to work in a good way, I can change digital hour going 1h up and down
Thx again
Cheers

This is for hours (0 to 23) only and sbould be sufficient to help you understand the logic and aply elsewhere e.g. for the 1 to 12 h case.

You should add additional layers & tags as required yourself.

Also refer to the Facer documentation; lots of info there to help you.

thx very much
Cheers

1 Like