# GetDateComponents (Date)

| **Name**    | ***GetDateComponents***                                                   |
| ----------- | ------------------------------------------------------------------------- |
| Syntax      | GetDateComponents (Date)                                                  |
| Purpose     | To return a structure providing individual date components.               |
| Description | Gets a structure representing individual date components.                 |
| Return Type | DateComponents                                                            |
| Parameters  | dateTime \[System.DateTime] – Date time for which components are required |

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

**Example**

We have an *Orders* dataset with the *OrderDate* field.

In this example, we will pass this field to the function transformation object to get the date components.

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

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

Right-Click on the function transformation object and select *Preview Output.* In the output, you can see that each date from the *OrderDate* field has been separated in the different date components.

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