# 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FaLTmrYNL0qrzLKw5OzF3%2F0.png?alt=media)

**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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F5M6wuTz7cjirbIy29kHj%2F1.png?alt=media)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FFo3PzHO1HHMwvSIpwWHn%2F2.png?alt=media)
