# Substring (String str, Integer startAt)

| Name                     | *Substring*                                                                        |
| ------------------------ | ---------------------------------------------------------------------------------- |
| Applicable To (DataType) | String                                                                             |
| Purpose                  | To retrieve the characters from a specified string.                                |
| Description              | Gets all the characters from the specified string beginning with startAt position. |
| Return Type              | String                                                                             |
| Syntax                   | str \[System.String] – string whose part will be returned.                         |
|                          | startAt \[System.Int64] – start position of the string to return.                  |

![properties](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/properties%201618245974412.png)

## Example

In this example, we are passing the required parameters to the function transformation through a *Variables* object.

Where,

*str* = ABCDEF

*startAt* = 2

![dataflow](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/dataflow%201618246042589.png)

Right-click on the function transformation object and select *Preview Output*. You can see that it has returned the string value after second position.

![output](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/output%20\(9\).png)
