# DateToIntegerYYYYMMDD (Date dateTime)

| **Name**    | ***DateToIntegerYYYYMMDD***                                             |
| ----------- | ----------------------------------------------------------------------- |
| Syntax      | DateToIntegerYYYYMMDD (Date dateTime)                                   |
| Purpose     | To convert the given date time to an integer.                           |
| Description | Convert the given date time value to an integer in the YYYYMMDD format. |
| Return Type | Int32                                                                   |
| Parameter   | dateTime \[System.DateTime] – Date time Object                          |

**Example**

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

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

Where,

*dateTime* = 01/01/2022 3:40:35 PM

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

In the output window, you can see that the provided value has been converted into an integer value, representing the specified date.

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