# ToUtc (DateTimeWithOffset)

| **Name**    | ***ToUtc***                                                                             |
| ----------- | --------------------------------------------------------------------------------------- |
| Syntax      | ToUtc (DateTimeWithOffset dateTimeOffset)                                               |
| Purpose     | To return UTC date time value after conversion.                                         |
| Description | Converts specified date time offset value to UTC.                                       |
| Return Type | DateTime                                                                                |
| Parameter   | dateTimeOffset \[System.DateTimeOffset] – DateTimeOffset which will be converted to UTC |

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

**Example**

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

Where,

*dateTimeOffset* = 07-18-2022 05:25:07 PM +05:00

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

In the output window, you can see that the provided date time offset value has been converted to its UTC date time value.

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