Splunk Search

How can I convert integer to decimal?

isac_santana
Explorer

Good Morning,
I'm having trouble converting a whole number to a decimal. 



Example:

 

 

| eval Amount = round(tonumber(balance_amount), 2)
Result: 814118225.00

 

 



But I need the number to look like:  8141182.25

Labels (1)
0 Karma
1 Solution

Manasa_401
Communicator

Hello @isac_santana 

If you want to convert an integer number to decimal, try dividing the number as shown below

| eval Amount = balance_amount/100

If this helps an upvote would be appreciated.

Thanks,

Manasa

View solution in original post

0 Karma

Manasa_401
Communicator

Hello @isac_santana 

If you want to convert an integer number to decimal, try dividing the number as shown below

| eval Amount = balance_amount/100

If this helps an upvote would be appreciated.

Thanks,

Manasa

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...