# LGF_TimeToString (FC / 3.1.0)

Overview

Author: Siemens Digital Industry

## Short description

This function converts a variable of the system data type `Time` into a variable of the data type `String`.

### Block Interface

| LGF_TimeToString (FC) |
--- | --- | ---
Time |  |  | timeValue |  | Ret_Val |  |  | String
Char |  |  | separator |  | stringDay |  |  | String
|  |  |  |  | stringHour |  |  | String
|  |  |  |  | stringMinute |  |  | String
|  |  |  |  | stringSecond |  |  | String
|  |  |  |  | stringMilliSecond |  |  | String

### Input parameter

Identifier | Data type | Description
--- | --- | ---
timeValue | Time | Time value to convert Example: `T#1D_3H_45M_6S`
separator | Char | Separator between the components of the output string

### Output parameter

Identifier | Data type | Description
--- | --- | ---
Ret_Val | String | Converted time as string. Example: `1D3H45M6S0MS`
stringDay | String | Converted day as string
stringHour | String | Converted hour as string
stringMinute | String | Converted minute as string
stringSecond | String | Converted second as string
stringMilliSecond | String | Converted millisecond as string

## Change log

Version & Date | Change description
--- | ---
| 1.0.0 | Siemens Industry Online Support
| 03.07.2018 | First released version
| 1.0.1 | Siemens Industry Online Support
| 17.08.2018 | Upgrade: TIA V15 Update 2
| 1.0.2 | Siemens Industry Online Support
| 23.11.2018 | Upgrade: TIA V15.1
| 1.0.3 | Simatic Systems Support
| 02.07.2019 | Standard header and block parameters update, status parameter added
| 1.0.5 | Simatic Systems Support
| 09.07.2019 | Further improvements minimization and commends added
| 1.0.6 | Simatic Systems Support
| 30.07.2019 | Add ENO handling
| 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
| 17.07.2025 | Implemented separator input and functionality