We will continuing using previous tutorial "Logistics" and add formatter to show how to use this feature

## Add Format to TransportGuide

Open your Visual Code and login. Open object **TransportGuide**.

Add to the existing property "deliverDate" the formatter rule that format the date in accordance with Culture/Language format or custom format.

Find property "deliverDate" and above the property and the following code lines

  • **_value** reference the property in the scope.

  • **_arguments** reference the arguments pass the formatter function. The formatter accept the following arguments:

  • **format** custom date format

  • **culture** code of Culture (Country/Language) to reference date format associated with (see object "LanguageDialect" and "Country" in the "Global" workspace)

The full code of the **TransportGuide** have to be:

## Download & Update Nuget packages

Build and download Nuget packages. _On build file ("Logistics") select "Download" (choosing directory where you want to download the files)_

Open your Visual Studio and the project previous created "Tutorial - Logistics".

Update the 2 Nuget packages on your Visual Studio project. _note: before updating, on command prompt (cmd), PowerShell or Package Manager Console of Visual Studio execute the command bellow_

_This clean nuget cache of the system, ensuring that version want is running_

## Use of Formatters

On class "Program.cs" add the following function:

Add call on "main" to the function that you have create.

Run the program and in the command prompt you should see the messages of the different date format in accordance with arguments:

  • format

  • culture(country/language)


The solution is available: [Source](🔗)