--- title: "ConvertToNumber" slug: "converttonumber" updated: 2024-05-04T19:24:52Z published: 2024-05-04T19:24:52Z 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](/release34/docs/number). NOTE If the value cannot be converted to a number (e.g. when trying to convert the [String](/release34/docs/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](/release34/docs/introduction-to-mail-and-deploy-expressions) returns the value of the variable *vTest* of [Datasource](/release34/docs/introduction-to-datasources) MyDatasource as [Number](/release34/docs/number): ConvertToNumber Function Example ConvertToNumber([Datasource].[MyDatasources].[Variable].[vTest]) If the variable contains a [String](/release34/docs/string) with value "*123*" then the returned number will be *123*.