Number format for first digit of hour

Hi
I want to use bitmap image for firt digit of hour. After I want to use bitmap for others numbers of hour (other digits), I know, I will put other digital clock component for it, I know how to use bitmap.

Exemple:
Hour: 12:45
I want to show only number 1
Hour: 0:45
I want to show only number 0

I’m using this tag:
numberFormat(“0” , [[HOUR_1_12_Z])

What is the problem? Does not work!

Hi, try this:
1st digit:
(floor(([HOUR_1_12]/10)))
2nd digit
([HOUR_1_12]%10)

Same logic applies to minutes.
You can also use only (HOUR_1_12_Z) with same width bitmaps. Set element width same as one bitmap width, then align first digit to left and second digit to right :slight_smile:

2 Likes

Thak you a lot!!
Now its working!

And now i’m traying for 24hr format too!! @amoledwatchfaces Can you help me again?
Exemples:
00:56 = 0
07:25 = 0
11:47 = 1
12:20 = 1
23:18 = 2

I put (floor(([HOUR_0_23_Z]/10))) but it’s not working :roll_eyes:

This format its working (floor(([HOUR_1_24]/10)))
But, here in Brazil and maybe in other countries, we use format 24 hour: 00 for midnight (00:15), not 24:15.

Your error is the leading zero. (_Z) Use the tag without leading zero
(floor(([HOUR_0_23]/10)))
and it should work.

2 Likes

I hadn’t looked at it.
Thanks, now it’s working as I want!
Thanks for your attention and help!