Skip to content

[FEATURE] tonumber function as part of roadmap #4287 #4514

Closed

Description

@asifabashar

Is your feature request related to a problem?
tonumber(<str>, <base>) function as part of roadmap #4287

What solution would you like?
tonumber(<str>, <base>)
This function converts a string to a number.
Usage
You can use this function with the eval and where commands, in the WHERE clause of the from command, and as part of evaluation expressions with other commands.
The argument can be a string or the name of a field that contains a string. If the string contains a decimal point ( . ), then the tonumber function converts it to a double. Otherwise, the function converts the string to an integer.

Be aware that integers are supported differently in different product contexts:
The argument is optional. It defines the base of the number in the argument. It defaults to 10, which corresponds to the decimal system. You can set to a number between 2 and 36, inclusive.

If the tonumber function cannot parse a literal string to a number, the function returns an error.

Basic examples
The following example converts the string values from the store_sales field to numbers, and then stores the numbers in a field named n. This example uses the default base of 10.
... | eval n=tonumber(store_sales)

The following example takes the hexadecimal number and uses a base of 16 to return the number "164".

... | eval n=tonumber("0A4",16)

What alternatives have you considered?
A clear and concise description of any alternative solutions or features you've considered.

Do you have any additional context?
Add any other context or screenshots about the feature request here.

Activity

  1. asifabashar commented on Oct 10, 2025

    @asifabashar
    MemberAuthor

    I am working on this ,please assign it to me

  2. added
    PPL
    and removed on Oct 11, 2025
  3. added a commit that references this issue on Oct 20, 2025
  4. added a commit that references this issue on Dec 11, 2025
  5. moved this from Not Started to Done in PPL Trackeron Dec 11, 2025
  6. added a commit that references this issue on Dec 11, 2025
  7. added 2 commits that reference this issue on Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

PPLenhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions