# TotalHours

| **Name**                 | ***Proper***                                                                          |
| ------------------------ | ------------------------------------------------------------------------------------- |
| Applicable To (DataType) | TimeSpan                                                                              |
| Purpose                  | To return a real number representing total number of Hours in the specified timespan. |
| Description              | Returns a real number representing total number of Hours in the specified timespan.   |
| Return Type              | Double                                                                                |
| Syntax                   | timeSpan \[System.TimeSpan] – TimeSpan for which the number of Hours will be returned |

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

**Example**

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

Where,

*timeSpan* = 20.10:20:30 (Format: dd.hh:mm:ss)

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/Hb2zs6UTTeSPiWebbTdy/TotalHours.png)

In the output window, you can see that the *timespan* value has been converted into a real value, indicating the total number of Hours present in the *timespan* value.

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