# Can I re-format the DateTime using building blocks?

[DateTime](https://leaptest.com/support/documentation/reference/the-building-blocks/generators/generate-date-time) representation is by default using the format of the localization settings in your system. You can change this in the **Generate date/time building block** by expanding it to provide you access to Year, Month, Day, and even Time. Using this option you can combine the date representation in any combination you’d like using “[Set Text](https://leaptest.com/support/documentation/reference/the-building-blocks/setting-values/set-text)” or “[Type Text](https://leaptest.com/support/documentation/reference/the-building-blocks/mouse-and-keyboard/type-text)” building blocks.

A sample Test case is shown below by creating a custom building block for formatting so that it can be reused :

**Expanded View of 'Date/Time formatting' Building Block shown above:**

There could be two cases where users can use the Date/Time format.

1. **To format the Date/Time field captured from a web page.**
2. When a user is capturing the date from a web page and wants to format it if needed. Below is the sample case showing how this can be done.
   ****
3. **To get the offset date from a given date.**
4. Also if a user wants to know the exact date/time from the date which is picked by the automation scripts as shown above, the "**Offset date/time"** building block can be used for that. Enter the Days/Months/years to offset in the respective fields as shown below:
6. **Scenario:** I want to know what will be the date/time in 15 days from 2/18/2018 12:00:00 AM as picked by the above script.
7.

**For any clarification, please contact our** [**Priority Support**](mailto:prioritysupport@leapwork.com) **..**
