# DayOfWeek (Date dateTime)

| **Name**    | ***DayOfWeek***                                                                                     |
| ----------- | --------------------------------------------------------------------------------------------------- |
| Syntax      | DayOfWeek (Date 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.DateTime] – Date for which the day will be returned                               |

**Example**

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

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

Where,

*dateTime* = 07/14/2022

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/tAVtR7DWedSmoIU7FLLr/1.png)

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

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