# DayOfWeek (DateTimeWithOffset dateTime)

| **Name**    | ***DayOfWeek with Offset***                                                                         |
| ----------- | --------------------------------------------------------------------------------------------------- |
| Syntax      | DayOfWeek (DateTimeWithOffset dateTime)                                                             |
| Purpose     | To return the day of week as an integer.                                                            |
| Description | Returns the day of week as an integer with 0 representing Sunday, 1 representing Monday, and so on. |
| Return Type | Int64                                                                                               |
| Parameter   | dateTime \[System.DateTimeOffset] – Date for which the day will be returned                         |

**Example**

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

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

Where,

*dateTime* = 07/16/2022

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

In the output window, you can see that the day of the week, Saturday, has been returned in its integer form, 6.

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