---
title: "gsql_to_bool()"
component: "gsql-ref"
version: "3.11"
module: "ddl-and-loading"
html_url: "/gsql-ref/3.11/ddl-and-loading/functions/token/gsql_to_bool"
canonical_url: "https://www.tigergraph.com/docs/gsql-ref/3.11/ddl-and-loading/functions/token/gsql_to_bool"
markdown_url: "https://www.tigergraph.com/docs/gsql-ref/3.11/ddl-and-loading/functions/token/gsql_to_bool.md"
---

[View as HTML](https://www.tigergraph.com/docs/gsql-ref/3.11/ddl-and-loading/functions/token/gsql_to_bool)

# gsql_to_bool()

Returns true if the input string is either "t" or "true" (case-insensitive) and returns false if otherwise.

## Syntax

`gsql_to_bool(in_string)`

## Parameters

in\_string

The input string.

## Return type

`BOOL`

## Example

gsql_to_bool("true") -> TRUE
gsql_to_bool("abc") -> FALSE
