Pad floor & Wind direction

I’m using the wind direction tag #WNDD# which results in 6.789 for example, I can use floor to get 6 but what I want is - 006 , I have tried to add ‘pad’ into the expression but without success.
(pad(floor(#WNDD#),3)) - this is one of many attempts. Is it possible to combine pad and floor in this way? I could use a conditon to add the zeroes if less than 100 for example but i would like to know if the floor/pad combo is possible.
Anybody help?

1 Like

Hopefully one of our many math wizards can help you with this, alas that isn’t me sorry

1 Like

Hi,
I dont know, in preview it works for me. In preview I cant simulate a decimal number for #WNDD# and your formula works for me. I also tried on miliseconds and it also worked well in preview:
(pad(floor(#Dsm#),3))

1 Like

@BIELITZ . Your formula works perfectly for me . You are typing it into the text box and not the Display ?
The only thing I have found is you can not nest Pad and toFixed.

1 Like

I just put that on my watch . #WNDD# gives me an integer on watch and Creator . So for me I would not need to floor the number . Do you want to show us a shot and or Post the Inspectable link .

It appears to be working at least in Facer Creator. I tried it in my test watch but the wind’s direction is WNW 296 here at the moment. But it is showing the correct numbering and not gibberish.

1 Like

@petruuccios made a comment related to a previous post related to my METAR weather report watchface (linked below):

‘Also the top line seems it could use some floor function as the digits behind decimal point overlap with something.’

I checked in the Help Centre -

#WNDD# Wind Direction Angle 45.98889 All

Sometimes it can have a decimal part and sometimes, it seems not! However on the watchface #WNDD# was going crazy and floor seems to have fixed it.
The link below is to the original watchface before i modified it- maybe it will still show the problem, i can’t tell until after it’s posted.

1 Like

Some times you can see errors in your Watchbox without Publishing a Face. Soon as I get on my Laptop I will have a look. It seems like you have an extra layer somewhere that only shows on publication. Sometimes it is because there is an extra ) at the end of your formula.

So you Face is not inspectable so I can not help there .

You can see what was happening in the watchface above - sorry but I thought I had turned on inspection, anyway thanks for the offer of taking a look at it for me. I always appreciate the help i get from you and the community.
Pad and floor seems to have fixed the problem.

1 Like

Still no inspection on the face above . I am glad you have sorted it yourself .