Announcement

Collapse
No announcement yet.

Script to display temperatures without decimal places

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script to display temperatures without decimal places

    I was able to get api key from apixu to display weather temperatures. However, the temps are displaying with decimal places (62.3). Doesn't look very clean. How do I use scripts to display whole number without decimal places. I want to put this in the text box in HSTouch designer. I've tried this script but didn't seem to work.

    [$SCRIPT=&Round(Rnd("[$RSS=http://api.apixu.com/v1/forecast.xml?[APIKey]&q=[Location]&days=5->day->maxtemp_f->0]"),0)]

  • #2
    There is a rounding function in vb.net: Math.Round(<variable>, n), where 'n' is the number of decimal places you want.
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

    Comment

    Working...
    X