--- title: "ConvertToBoolean" slug: "converttoboolean" updated: 2024-05-04T19:20:46Z published: 2024-05-04T19:20:46Z canonical: "help.mail-and-deploy.com/converttoboolean" --- > ## 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. # ConvertToBoolean ### General The *ConvertToBoolean* function can be used to convert a value to a [Boolean](/release34/docs/boolean) (true/false). NOTE If the value cannot be converted to a boolean (e.g. when trying to convert the String "This is a text" to a boolean), the execution of the report document preview or task will fail. ### Syntax The syntax of the *ConvertToBoolean* function is: ConvertToBoolean Function Syntax ConvertToBoolean() ### Examples The following [Expression](/release34/docs/introduction-to-mail-and-deploy-expressions) returns the value of the variable vTest of Datasource MyDatasource as a boolean: ConvertToBoolean Function Example ConvertToBoolean([Datasource].[MyDatasources].[Variable].[vTest]) If the variable contains the value 0 then the returned value will be false.