# 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FLINDBkGyhrgRVEd67YAD%2F0.png?alt=media)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FAi4yKpY2e9wGgcxGFVPN%2F1.png?alt=media" 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F8WsvqWE8rz4pO2dCOKM7%2F2.png?alt=media)
