> For the complete documentation index, see [llms.txt](https://ieg4.gitbook.io/onevu-digital-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ieg4.gitbook.io/onevu-digital-platform/onevu-control/data-silos/dynamic-content/working-with-back-office-data/formatting-data-items.md).

# Simple Item Formatting

Sometimes (a lot of the time!) back-office systems provide data in a format that you wouldn't want to show the customer. E.g.&#x20;

E.g. Next Payment Date for Benefits is returned with a timestamp:

01/01/2017 00:00

So clearly we want to be able to cut that out.

Within the editor it is possible to format the answers using extra snippets of text.

**Convert a date to drop the timestamp**

The following illustrates the Next Payment Date example above. One can see that to remove the timestamp the highlighted part needs to be added to the end of the Data Field in question:

${NextPayment.Dat&#x65;**.ToString(“dd/MM/yyyy")**}

I.e. copy and paste this: **.ToString(“dd/MM/yyyy")** to the end of the template field that is a date.

You can break a date into its constituent elements:

The following will convert the date into just the date of the month:

${Claim.Hb.Entitlement.StartDate.ToString(“dd")}

This will convert the month e.g. 10 to the month into the word October

${Claim.Hb.Entitlement.StartDate.ToString(“MMMM")}

And this will change the date to only show the year e.g. 2018

${Claim.Hb.Entitlement.StartDate.ToString("yyyy")}

\
&#x20;**Convert a long decimal to only have two decimal places**

In some cases the back office APIs actually provide an answer like this: 1244.0323232<br>

Whereas obviously you would want the customer to see:\
&#x20;1244.03<br>

The following will ensure that this formatting is applied to the value:

${PropertyBand.FullYearCharg&#x65;**.ToString("f2")**}

The following illustrates examples of this:&#x20;

| What to add                     | Example             | What it changes it to   |
| ------------------------------- | ------------------- | ----------------------- |
| .ToString("C")                  | 100                 | £100.00                 |
| .ToString("F2")                 | 100                 | 100.00                  |
| .ToString("dd/mm/yyyy")         | 03/12/2018 00:00:00 | 03/12/2018              |
| .ToString("dddd, dd MMMM yyyy") | 03/12/2018 00:00:00 | Monday, 3 December 2018 |

E.g. Adding .ToString("dd/mm/yyyy") to the end of the Data Item NextPayment.Date:

```
${NextPayment.Date.ToString("dd/MM/yyyy")}
```

This ensures the date will be presented like 03/08/2021 not 03/08/2021 00:00:000 which is what we get from Civica and Northgate systems.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ieg4.gitbook.io/onevu-digital-platform/onevu-control/data-silos/dynamic-content/working-with-back-office-data/formatting-data-items.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
