DQL
Questions about Dynatrace Query Language
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Convert String to Integer in Dynatrace Query Language (DQL)

nikhilchandra
Visitor

Summary: This thread explains how to use DQL functions to convert string values into numeric or integer formats. It includes syntax examples and practical use cases for data transformation in Dynatrace dashboards.



Hi Experts

May i know which function to use to convert string value in to Integer or Number format?

2 REPLIES 2

nikhilchandra
Visitor

@Mizső  but i am getting null output, as the input value is a string.

krzysztof_hoja
Dynatrace Champion
Dynatrace Champion

toLong() conversion function , but the string being parameter needs to be a valid number, otherwise you will get null

data 
  record(s="1"),
  record(s="1.2"),
  record(s="a")
| fieldsAdd i=toLong(s), d=toDouble(s)

krzysztof_hoja_0-1725183035460.png

 

Featured Posts