# LGF_DTLToJulianDate (FC / 0.0.1)

Overview

Author: Siemens Digital Industry

## Short description

This function converts the date and time of data type DTL to the Julian date and as well the modified Julian Date to data type LReal (Double).
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_DTLToJulianDate (FC) |
--- | --- | ---
DTL |  |  | timeDTL |  | Ret_Val |  |  | Void
|  |  |  |  | julianDate |  |  | LReal
|  |  |  |  | modifiedJulianDate |  |  | LReal
|  |  |  |  | error |  |  | Bool
|  |  |  |  | status |  |  | Word

### Input parameter

Identifier | Data type | Description
--- | --- | ---
timeDTL | DTL | Date and time as DTL to convert to Julian Date

### Output parameter

Identifier | Data type | Description
--- | --- | ---
Ret_Val | Void | ---
julianDate | LReal | Converted Julian date
modifiedJulianDate | LReal | Converted modified Julian date
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_EXECUTION_FINISHED_NO_ERROR Execution finished without errors
16#8000 | ERR_DTL_INPUT_VALUE_INVALID Error: Input timestamp value not valid. The data type contains implausible data.
16#8001 | ERR_TIME_BEFORE_1990 Error: Input time is before 01/01/1990. The function does not support this conversion, because of internal used datatype

## Change log

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