# Expression - Anomaly of representation between facer app/watch VS creator on facer.io

Hi,

I just found an anomaly of representation between the creator on facer.io and the application facer.

Expression to manage the hours 12/24:

``````\$#Db#<=9?(0)#Db#:\$\$#Db#=24?(0)(0):#Db#\$
``````

What I wish for hours (12/24):

• from 0 to 9 => add a 0 before
• from 10 to 23 => 10 to 23
• for 24 => 00 (in 24h mode)

What appears on Creator on facer.io: (what I want)

00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23

What appears on facer app and my watch (LG G Watch R): (problem)

00 011 022 033 044 055 066 077 088 099 10 11 12 13 14 15 16 17 18 19 20 21 22 23

Do you have the same problem? If yes, please can you fix this problem?

Thank you by advance.

Adding conditions inside of conditions is bugged in Facer, better use this: http://docs.facer.io/boolean-logic

Unfortunately, I know that Facer is buggy on adding conditions inside conditions

Do you have an idea of a formula with the boolean logic, that answers what I want to get :

Thank you again.

First thing, use #DH# for hours.
It gives you 24 as 0 so you have only this:

• from 0 to 9 => add a 0 before
• from 10 to 23 => 10 to 23

Because of that, you donâ€™t need to create a condition with boolean logic.
This should work:

``````\$#DH#<=9?(0)#Db#:#DH#\$
``````

BTW.: If you want only to get a leading 0 if hour have only 1 digit at a moment, why wonâ€™t you use #DHZ#, or #DkZ#?

Thanks for your reply, but I canâ€™t use an other tag that #Db# because I want my watchface to be configurable in 12/24

But you put me on the way

Here is the expression that answers my need with boolean logic :

``````\$#Db#<=12&&#Db#>0?#DhZ#:#DHZ#\$
``````

I donâ€™t pass this topic as solved because the problem of adding conditions inside of conditions is still current.

Yep, Iâ€™ve reported that lack on last official release of Facer, so we can hope.

I also need to remember to add â€śuserâ€™s preferred formatâ€ť tag to my list of that is missing.
That would help us a lot.

1 Like