User Preferred 12H/24H Leading Zero Only 24H

Hi

I have some comments of users that would like to see when select 24H time a leading Zero but the only formula I could find changes both 12h and 24h.

$#Db#>9?#Db#:0(#Db#)$:#DmZ#

Is it possible to have user preferred and 12H (no leading zero) 24H (leading zero) ?

Thanks.

Use #Db# for 12-hour and #DHZ# for 24-hour.

2 Likes

Thanks for the reply I understand I can use these formulas but how to make this user preferred so they can choose between 12H 24H as one formula?

I try $#Db#>9?#Db#:0(#Db#)$:#DHZ# and still shows 12H with leading zero.

In the Opacity box use $#DTIMEFORMAT#==12?100:0$ for 12-hour mode and $#DTIMEFORMAT#==24?100:0$ for 24-hour mode. After you do that the digital time display will be user selectable.

3 Likes

Thanks you so much :slight_smile:

I used this simly code in one of my watch faces and it works exactly as you need:

#Db#:#DmZ#

12H Mode no leading zero
24H Mode leading zero

1 Like

The formula you are trying to use, I use in the opposite case, when I want to have a leading zero even in the 12H format

What about putting it in just one text field like $#DTIMEFORMAT#==24?#DHZ#:#Db#$:#DmZ#

I dont know, but in my creator the #Db# does not give leading zero for any mode.

1 Like

Great topic. Had the same issues.

Ah, maybe it’s because of the localization, I don’t understand it

1 Like

This is the exact one I use in the Text field for it to show leading zero in 24hr mode and no leading zero in 12hr mode. All based on user selection of 12/24. This works on my Ticwatch Pro 3.

1 Like

The #Db# does not show a leading zero in 24-hour mode on every watch. Some do, some don’t. If you want to force it to work with a leading zero in 24-hour mode in the creator and on all watches, you must use two separate elements. Use #Db# in one with an opacity tag for 12-hour only. Use #DHZ# in the other one with an opacity tag for 24-hour only and it will work exactly as you want.

1 Like

I have to say I find when trying to use #Db# and #DHZ# in the same Conditional I get mixed results . I don’t think the Platform Likes doing Maths with Leading Zero Stuff.
I split them up and use the old #DTIMEFORMAT# in the Opacity Tag . Partly because I have an obsession with 12 hrs having a leading zero . Because of this I Have #Db# on a hidden layer as On Tizen you will not get the option to change it on the Watch if you don’t .

1 Like

I actually meant what you just stated but I worded it incorrectly. I’ve changed my statement to make it clearer. Two separate elements with opacity tags one for 12-hour and the other for 24-hour.

1 Like

MAG I just wanted to make it clear what I do . It is a Miracle I remembered at all . Only because I have done a bit recently . In a months time I will have to start from the beginning again . I think I should copy My own answer and paste it into a File . Leave it on the desktop with all the other Cutter .

1 Like