# ToTimeSpan (Hours, Min, Sec)

| **Name**                 | ***ToTimeSpan***                                                                                                                                                                       |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Applicable To (DataType) | Int64                                                                                                                                                                                  |
| Purpose                  | To return the converted timespan value.                                                                                                                                                |
| Description              | Converts parameters into a TimeSpan value.                                                                                                                                             |
| Return Type              | TimeSpan                                                                                                                                                                               |
| Syntax                   | <p>hours \[System.Int64] – Number of hours in TimeSpan</p><p>minutes \[System.Int64] – Number of minutes in TimeSpan</p><p>seconds \[System.Int64] – Number of seconds in TimeSpan</p> |

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/IGkl6lpdZEB9RRVY88U9/0.png)

**Example**

In this example, we will pass the required parameters to the function transformation object using a *Variables* object.

Where,

*hours* = 6

*minutes* = 50

*seconds* = 40

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/eVTZxrfBxdqdtG7UXXpY/1.png)

In the output window, you can see that the integer values have been converted into a TimeSpan value.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/3tbz4dLwbPXoegZJGXSF/2.png)
