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!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...