> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/map-shape/working-with-field-transformations/available-transform-functions/date-transform-functions/round-date-transform-function.md).

# Round date transform function

## Introduction

The **round date** transform function is used to round source dates to either the start or end of the day, where:

* `start of day` changes the time to `00:00` for the received date
* `end of day` changes the time to `23:59` for the received date

So, you can round a given source date before sending the rounded value into a given target field.

## Adding a round date transform

**Step 1**\
In your process flow, access settings for your map shape:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FWVyqnULF7g5M3Pd7G8aN%2Fcustom%20string%201.jpg?alt=media&amp;token=ff64e072-de9d-409d-b428-5d8ccfc9fdad" alt="" width="261"><figcaption></figcaption></figure></div>

**Step 2**\
Select the **add transform** button for the required mapping rule - for example:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FxOOae75HpSijTH2Ou8AJ%2Fmap%20transform%203.jpg?alt=media&amp;token=9f624f78-9604-47d4-b599-86d75760b7ce" alt="" width="375"><figcaption></figcaption></figure></div>

**Step 3**\
Click the **add transform** button:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F3Ua8TKaE4TZFejZDXzLl%2Fmap%20transform%204.jpg?alt=media&amp;token=9ad403ed-d029-4c81-ab5c-ee9839b6316d" alt="" width="375"><figcaption></figcaption></figure></div>

**Step 4**\
Click in the **name** field to access a list of all available transform functions, then select **round date**:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FnGMOdmE29Gozn1DSLT0v%2Fround%20date%201.png?alt=media&amp;token=7a8bda1c-0de0-44bb-a508-7d059bc87ade" alt="" width="375"><figcaption></figcaption></figure></div>

**Step 5**\
Choose your required rounding:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FtTV1cpcga8jnMuRQZ7ZB%2Fround%20date%202a.png?alt=media&amp;token=0ff9638c-d776-4f95-84c5-01e00f9c0f7c" alt="" width="375"><figcaption></figcaption></figure></div>

**Step 6**\
Accept your changes and save the transformation - at this point your mapping row is displayed without a target. From here, you can go ahead and add a target field:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F6LfsJkxsvHouNqW9IdqG%2Fround%20date%203.png?alt=media&amp;token=308c5ec4-7446-4b59-9c47-56b756ed20e8" alt="" width="375"><figcaption></figcaption></figure></div>
