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 Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...