I have an item:
Number ElectricalCost2 “Electrical cost [%.2f Kr]”
In a rule I put the value in a var that I mail
var doorbellmessage = “El Konsumption=”+ ElectricalCost2.state as DecimalType
sendMail(“xxxx@hotmail.com”, “Dagens Energi Kostnad”, doorbellmessage, attachmentUrlList)
This works fine, but in the recieved mail i got to many decimals
El Konsumption=37.3544887500Kr
How can I reduce the number of decimals to 2 in the var/mail?