# LGF_JulianTimeToDTL (FC / 0.0.1)

Overview

Author: Siemens Digital Industry

## Short description

This function converts a given Julian Date (regular or modified) of data type LReal (Double) to a date and time of data type DTL.
The timestamp is calculated based on UTC. This means that the time zone is not considered.

Only times after 01/01/1990 are permitted.

### Block Interface

| LGF_JulianTimeToDTL (FC) |
--- | --- | ---
LReal |  |  | julianDate |  | Ret_Val |  |  | DTL
Bool |  |  | isModifiedDate |  | error |  |  | Bool
|  |  |  |  | status |  |  | Word

### Input parameter

Identifier | Data type | Description
--- | --- | ---
julianDate | LReal | Julian date to convert (standard or modified, depends on `isModifiedDate`)
isModifiedDate | Bool | TRUE: `julianDate` is the modified Julian date FALSE: `julianDate` is the regular Julian date

### Output parameter

Identifier | Data type | Description
--- | --- | ---
Ret_Val | DTL | Converted time (Date and time). In case of Error DTL default value
error | Bool | FALSE: No error TRUE: An error occurred during the execution of the FB
status | Word | 16#0000-16#7FFF: Status of the FB 16#8000-16#FFFF: Error identification (see following Table)

### Status & Error codes

Code / Value | Identifier / Description
--- | ---
16#0000 | STATUS_NO_ERRROR Status: Execution finished without errors
16#6001 | WARN_CONVERSION_LIMIT Warning: Julian date (julianDate) is exactly at the lower limit of 01.01.1990.
16#8000 | ERR_TIME_BEFORE_1990 Error: Julian date `julianDate` is before 01/01/1990. The function does not support this conversion.

## Change log

Version & Date | Change description
--- | ---
| 1.0.0 | Siemens Industry Online Support
| 14.04.2023 | First released version