---
title: "Exercise 6 - Formatting Date Picker and Number Fields"
canonical: "https://docs.getxporter.app/space/XPORTERCLOUD/430230/Exercise%206%20-%20Formatting%20Date%20Picker%20and%20Number%20Fields"
format: markdown
---
> Macro (rw-ui-expands-macro)
> 
> > Macro (rw-expand)
> 
> > Macro (toc)

# Introduction

In this exercise, you'll learn how to format the information from the Date Picker and Number fields to be printed in a [Template](https://docs.getxporter.app/space/XPORTERCLOUD/427622).

To begin, we will create a custom field of type Number Field and name it "Price".

> ℹ️ Since Jira has native Date Picker fields, like *Created* or *Updated*, we won't need to create one of those for this exercise.

# Formatting Date Fields

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> If you're exporting a Date Field, you can set the format of how the date is displayed in the generated file.
> 
> > Macro (rw-step)
> 
> All the patterns included in the *SimpleDateFormat Java API* are supported.
> 
> > Macro (rw-step)
> 
> You can use this mapping in different ways:
> 
> |  |
> | --- |
> | `${``dateformat("<Format>"):``<Field name>}` |
> 
> - For instance, if you want to print only the date and not the time, use `${dateformat("yyyy-MM-dd"):Created}`
> - If you want to print the date and time, use `${dateformat("dd-MM-yyyy HH:mm:ss"):Created}` instead.
> 
> > ℹ️ More details about [formatting Date Picker fields](https://docs.getxporter.app/space/XPORTERCLOUD/558535/Formatting+Fields).

# Formatting Number Fields

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> If you are exporting a Number Field, you can set how the number contained in it is displayed in the generated file.
> 
> > Macro (rw-step)
> 
> All the patterns included in the *DecimalFormat(String pattern) Java API* are supported.
> 
> |  |
> | --- |
> | `${``numberformat("<pattern>"):``<Field name>}`<br>`${``numberformat("<Locale>","<pattern>"):``<Field name>}` |
> 
> > Macro (rw-step)
> 
> In the issue, populate the *Created Date*, *Updated Date* fields, and the *Price* custom field.
> 
> The native and custom fields with the notation are listed below.
> 
> ```
> ${dateformat("yyyy-MM-dd"):Created}
> 
> ${dateformat("dd-MM-yyyy HH:mm:ss"):Created}
> 
> ${numberformat("de_DE" , "###,###.###"):Price}
> 
> ${numberformat("##0.#####E0"):Price}
> ```
> 
> ### Examples
> 
> Below (Figure 1) is a sample of how the [mappings](https://docs.getxporter.app/space/XPORTERCLOUD/558575) will be displayed in a Word template.
> 
> ![Figure 1 - Word template](media://c89c9530-44d8-43e6-bf52-b46d39f2886c)
> 
> This template (Figure 1) includes:
> 
> - A header with a logo (Figure 1 - 1).
> - Headings (Figure 1 - 2).
> - Text styling (Figure 1 - 3).
> 
> Below (Figure 2) is a sample of how the generated file will be populated.
> 
> ![image](media://25ad35ed-92f0-42ae-b071-11a312db4293)
> 
> > ℹ️ More details about [formatting Number Fields](https://docs.getxporter.app/space/XPORTERCLOUD/558535/Formatting+Fields).


> ℹ️ **This exercise is now complete. Proceed to **[**Exercise **](https://docs.getxporter.app/space/XPORTERCLOUD/430106/Exercise+7+-+How+to+Populate+a+Bulk+for+all+Issues+Displayed+on+the+Screen)[**7**](https://docs.getxporter.app/space/XPORTERCLOUD/430106/Exercise+7+-+How+to+Populate+a+Bulk+for+all+Issues+Displayed+on+the+Screen)** to learn h****ow to populate a bulk for all issues displayed on the screen.**
> ℹ️ 
> ℹ️ If you like this exercise, please leave a comment or a 👍. Your feedback is very important to us.
> ℹ️ 
> ℹ️ Thank you in advance. Enjoy our product!

<details>
<summary>Exercise 6 Resources</summary>

| **File** | **Description** |
| --- | --- |
|  | **Exercise 6** - Sample template file |
|  | **Exercise 6** - Sample generated file |
</details>


<details>
<summary>Support/Troubleshooting</summary>

If you have questions or technical issues, please [contact the Support team via the Customer Portal (Jira service management)](https://jira.getxray.app/servicedesk/customer/portal/2/user/login?destination=portal%2F2%2Fcreate%2F28) or [send us a message using the in-app chat](https://docs.getxporter.app/space/XPORTERCLOUD/18251779/In-App+Chat+Support).
</details>