# LGF_DTLToString_DE (FC / 3.1.1)

Overview

Author: Siemens Digital Industry

## Short description

This function converts a date of data type DTL into a character string of data type STRING in the traditional German format (DE) (DD MM YYYYY…).

### Block Interface

| LGF_DTLToString_DE (FC) |
--- | --- | ---
DTL |  |  | date |  | Ret_Val |  |  | String
Char |  |  | separator |  |  |  |  |
Char |  |  | separatorDateAndTime |  |  |  |  |

### Input parameter

Identifier | Data type | Description
--- | --- | ---
date | DTL | Date to convert as DTL tag
separator | Char | Separator between the components of the output date.
separatorDateAndTime | Char | Separator between the components date and time.

### Output parameter

Identifier | Data type | Description
--- | --- | ---
Ret_Val | String | Output string according to the traditional German format. Example: `22-01-2019 14:07:57.696417000`

## Functional description

The block reads a date of data type DTL and converts the individual components of the date (year, month, day, hour…) into a character string and outputs it in traditional German format (DE). The separator between the components of the date is variable.

### Traditional German format (DE):

### Separator:

At the input parameter `separator`, you specify the separator between the components of the date, at `seperatorDateAndTime` you specify the separator between the date and the time.

### Example:

- separatorDate = `-` - outString = `16-03-2016…` (default)

- separatorDate = `/` - outString = `16/03/2016…`

- separatorDateAndTime = `` - outString = `2016-03-16 12:45…` (default)

- separatorDateAndTime = `T` - outString = `2016-03-16T12:45…`

## Change log

Version & Date | Change description
--- | ---
| 1.0.0 | Simatic Systems Support
| 18.07.2019 | First released version Split from "LGF_DTLToString"
| 3.0.0 | Simatic Systems Support
| 23.04.2020 | Set version to V3.0.0 Harmonize the version of the whole library
| 3.0.1 | Simatic Systems Support
| 23.02.2021 | Insert documentation
| 3.1.0 | Simatic Systems Support
| 25.07.2025 | Insert parameter for separator between Data and time Assign default value '-' for separator parameter
| 3.1.1 | Simatic Systems Support
| 09.10.2025 | Spelling errors