--- title: "ConvertToNumber" slug: "converttonumber" description: "Reference for the ConvertToNumber function: how it converts a value to a number, its parameters, and an example of its use." updated: 2025-10-07T09:58:30Z published: 2025-10-07T11:02:35Z canonical: "help.mail-and-deploy.com/converttonumber" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.mail-and-deploy.com/llms.txt > Use this file to discover all available pages before exploring further. # ConvertToNumber ### General The ConvertToNumber function can be used to convert a value to a Number. NOTE If the value cannot be converted to a number (e.g. when trying to convert the String "This is a text" to a number), the execution of the report document preview or task will fail. ### Syntax The syntax of the ConvertToNumber function is: ConvertToNumber Function Syntax ConvertToNumber() ### Examples The following Expression returns the value of the variable vTest of Datasource MyDatasource as Number: ConvertToNumber Function Example ConvertToNumber([Datasource].[MyDatasources].[Variable].[vTest]) If the variable contains a String with value "123" then the returned number will be 123.