Give user the option to switch between 12H and 24H?

Hi,

I have searched and tested for quite some time now but I cannot find the option. Can I have the user be able to switch between 12H and 24H? As far as I see, I can choose either one but it’s not changeable for the user. It also doesn’t use the users phone settings, it just uses what I set it to in the tag section.

Thanks in advance for any help!

1 Like

Hi,
the original documentation is very limited.

  1. You have to add duplicate of time field (one set to display time in 12h, the other display in 24h format).
    2.a you can open the condition line for 12/24h and assign which layer will be displayed with which condition.

2.b you can set the duplicates to appear/disappear using expression with tag [IS_24H] in opacity or placement.

2 Likes

That was it. I never found that documentation. Thank you so much!

1 Like

I did the above, but how do you set the watch to 24H? I changed me phone to 24H and expected the change to sync down to my watch but nothing is happening.

1 Like

Either on the 12/24 timeline or use tag [IS_24] on the opacity.

You may have to restart your watch after the change.

Ron
Samsung Developer Relations

1 Like

I put the IS-24H tag in the opacity and I can switch in the Watch Face Studio by clicking the 12H and 24H buttons. My question is, once it’s deployed to the phone, how do I set it to 24H mode?

1 Like

It will sync to your phone. For most users it is set automatically to 12/24 according to the local time. But you can set your 12/24 in Settings → General Management → Date and Time

Ron
Samsung Developer Relations

2 Likes

@r.liechty_SDR Sadly there is not enough here to complete the task that the Question posed .
On A GW4 I could not find any setting for 12/24 hrs . Having had to disconnect the watch to look at the menu . Doing a search in Samsung help is a bit of a joke . How 12/24 hrs is set by Local time I have no Idea .

I would raise a ticket with Samsung but I find that a waste of time .


Screenshot_20221215_111931_sysui (1)

So where do we go next . I see no option to toggle between 12 and 24 hrs even if I could be bothered to make the test .

The watch should follow the settings of paired phone. Does your phone not have time format option either?

1 Like

I think the option is there when you pair your watch and phone. The setting is 12 hr 24 hr or sync with phone. But it has been a while and I don’t want to reset my watch to test it.

In the old days the Gear Watch designers had to make two watch faces one for 12 and one for 24 now that was a pain.

Ron
Samsung Developer Relations

1 Like

Sorry I missed this one.

How 12/24 hrs is set by Local time I have no Idea

When you move locations the Smart Watch detects where you are and updates the locale. I guess it gets the time information from cell towers but that is just my guess.

Ron
Samsung Developer Relations

1 Like

Hey Peter thanks for joining in . The only thing I could find ids this and it made no difference .

That is where it changes mine.

1 Like

So thanks @jlcash61 @Peter @r.liechty_SDR . It works now . just a mater of being a bit more Patient . I used ([IS_24H]==0?100:25) I the Opacity Field of a Time layer .
I post my Test here I can not imagine anyone would be interested .
Thanks very much Indeed you guys for Helping . Steep learning curve for me .

12_24_HOURS_TEST.zip (177.4 KB)

2 Likes

I think we all misunderstood what you wanted.

If you are satisfied with two clocks
create a 24 hour watch face and a 12 hour one
one slightly above the other
Create two images one his clear on the top half the other is clear on the bottom half background color
put one of the images so it fits over both watch faces so it shows the top and hides the bottom
Tap Action and change image to show the other one with bottom showing and top hidden

Ron

2 Likes

@r.liechty_SDR Hey Ron Thanks . Good Idea . I know you don’t have time to open all the test faces people post on here . I am happy with the test above . But Yum Your Idea is Nice . I am thinking of building a chronograph so Ideas like that will be so useful . It is very Nice to be able to use interactives without paying a Subscription . Also that that Th UI does not seem to be Broken all the Time :::)))

The Tag Formula:

([IS_24H]>0?[HOUR_0_23_Z]:[HOUR_1_12]):([MIN_Z])

You just need one Time field. And you put it in the Text Field.

Is the time 24H? If YES, the HOUR will be shown from 00 to 23. If NOT, The hour will be shown between 1 to 12 without the leading 0.

Note that at midnight, it will be shown as 12:00 AM and not 0:00 AM.

I hope this helps! :grin:

1 Like

@kswatch07 Hey thanks. In my test I split them up so I could see w by at was going on. Just learning my way into the Syntax… Completely new to me that you can have two : in a conditional. I will be testing that when I get up. How many : ( full colons ) can we have in a conditional. Test test TEST , is the answer I suppose .

Only one. The first is enclosed in parenthesis so the result is a number, then there is text of colon and another number. The second colon is only separator for the minutes, it is not for another condition.

3 Likes