# CharToSeconds (Str)

| **Name**    | ***CharToSeconds***                                                                                   |
| ----------- | ----------------------------------------------------------------------------------------------------- |
| Syntax      | CharToSeconds (String timestring)                                                                     |
| Purpose     | To compute the total number of seconds from the beginning of the day to the date time value provided. |
| Description | Parses a date time string and returns number of seconds since the beginning of the day.               |
| Return Type | Int32                                                                                                 |
| Parameter   | timestring \[System.String] – Datetime string to be converted into seconds                            |

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

**Example**

In this example, we will pass a date time string (*timestring*) value to the function transformation object using a *Variables* object.

Where,

*timestring* = 12:50:10

<figure><img src="https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/ANADp9P6wgEre1S7Pkvv/1.png" alt=""><figcaption></figcaption></figure>

In the output window, you can see that the provided *timestring* value has been used to compute the total number of seconds since the beginning of the day.

<figure><img src="https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/tuR0aEv3xEAqhel4QxJ2/2.png" alt=""><figcaption></figcaption></figure>
