View previous topic :: View next topic |
Author |
Message |
Kris
Joined: 12 May 2010 Posts: 375
|
Posted: Mon Oct 08, 2018 12:18 am Post subject: SNMP value to single decimal |
|
|
Hi guys,
I'm pretty sure this has been answered before, but I can't find it anywhere.
I have a SNMP test that returns a temperature in 3 digits.
It needs to be divided by 10 to get the actual value.
So far I came up with
Code: | [%SuggestedReply_Integer% div 10] |
However, this only returns the integer part, eg. 253 becomes 25 instead of 25.3
What am I missing here?
Thanks! |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Mon Oct 08, 2018 3:41 am Post subject: |
|
|
[%SuggestedReply_Integer% div 10].[%SuggestedReply_Integer% mod 10]
If decimal separator on your system is comma, then use comma
[%SuggestedReply_Integer% div 10],[%SuggestedReply_Integer% mod 10]
Regards
Alex |
|
Back to top |
|
|
Kris
Joined: 12 May 2010 Posts: 375
|
Posted: Tue Oct 09, 2018 3:31 am Post subject: |
|
|
Awesome. Works like a charm.
Thanks! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|