Trying to figure this out. Grrrrr!

Can’t figure out how to get the mi/km to be in front of the numbers, this one is set to 0.44 mi. I need it to read mi: 0.44. Thank in advance and as always I greatly appreciate it.

$#UNITSYS#=IMPERIAL?((floor(((((#ZSC#*2.34)/52.8))/100)*100))/100) mi:((round((#ZSC#*2.34)/32.8))/100) km$

1 Like

Try this: $#UNITSYS#=IMPERIAL?mi ((floor(((((#ZSC#*2.34)/52.8))/100)*100))/100):km ((round((#ZSC#*2.34)/32.8))/100)$

You won’t be able to use the mi: or km: because Facer will consider it part of the complication and it will break it. You could try a dash (-) or a comma (,). I know the dash will work, but the comma might mess things up.

1 Like

Yes as @mrantisocialguy said, the “:” part of the math, so the only way would be to split the unit and the value in 2 separate elements.
I would align the unit to the right and the value to the left:

2 Likes

Ok, is there a way to have both units on the face but only show the unit that the end user is using mi/km?

1 Like

sure.
The unit text field would be:
#UNITSYS#=IMPERIAL?mi:km$

And the right element is you formula from above, just remove " mi:" and " km"

1 Like

But still needing the way I need it to be?

1 Like

I am putting this #UNITSYS#=IMPERIAL?mi:km$ ((floor(((((#ZSC#*2.34)/52.8))/100)*100))/100):km ((round((#ZSC#*2.34)/32.8))/100)$ instead of $#UNITSYS#=IMPERIAL?mi ((floor(((((#ZSC#*2.34)/52.8))/100)*100))/100):km ((round((#ZSC#*2.34)/32.8))/100)$ and it’s not working am I not understanding something? This is I always ask for help.

1 Like

OK. Having serious Deja Vu all over again but let me give it a shot. I am on a conditional roll just now.

It’s serial conditions anyway so you can just pop your colon between
$#UNITSYS#=IMPERIAL?Mi:Km$:$#UNITSYS#=IMPERIAL?((floor(((((#ZSC#*2.34)/52.8))/100)*100))/100):((round((#ZSC#*2.34)/32.8))/100)$

2 Likes

Man this sh*t is a pain, probably because this old brain doesn’t understand the coding. But anyway, this will work for both miles and km depending on the users preference?

1 Like

Tested it before sending. Got your numbers.
Just break it down

$#UNITSYS#=IMPERIAL?Mi:Km$
:
$#UNITSYS#=IMPERIAL?((floor(((((#ZSC#*2.34)/52.8))/100)*100))/100):((round((#ZSC#*2.34)/32.8))/100)$

Darts should be taught primary. Never do 57*3. Do 60*3-9

2 Likes

Thank you kindly!

1 Like

Have no clue what you just put here.

1 Like

I split the parts out from one statement into lines so each could be read as its own component. It’s the same thing as the single line expression but readable in each part. Helps build complex things out of smaller bits and then take away the carriage returns to go into Facer.
Or just build a library of things that work. Or both.

2 Likes

This is why I need this. New face I’m working on

3 Likes

And now it’s done! Thanks you the help, I greatly appreciate it!!

3 Likes

Of course, just to throw the spanner in the works. Here in the UK we measure distance in miles and temperature in Celsius! linking the info to imperial or metric will undoubtedly P1ss soneone off.

Saying that, you can only do what you can do, and you can’t please all of the people all of the time.

2 Likes

To add, here a formula to display the opposite of your temperature settings of your watch. So if you have set to Fahrenheit, it will show Celsius and the other way around. This way you can display both Celsius and Fahrenheit at the same time.

So you can apply this to mi/km or what ever has imperial/metric settings.

$#UNITSYS#=IMPERIAL?(toFixed((#WCT#-32)*5/9,1)):(toFixed(#WCT#*9/5+32,1))$ $#UNITSYS#=IMPERIAL?Celcius:Fahrenheit$

2 Likes

Temprature Celcius Wind speed MPH Please .
I buy Petrol by the Litre . Pump my tyers up to 33 PSI and drive a Good few Miles before checking them again . In the UK we went Metric in 1972 .
When I am estimatingca DIY job it is Imperial . In a Workshop I am using MM . :rofl::blush::joy:

2 Likes

And after all that, down to the pub for a few pints

3 Likes