Documentation

DATETOTALDAYS

Function name

DATETOTALDAYS

ST call

PROGRAM DATETOTALDAYS_DEMO
VAR
D1: DATE;
LR1:LREAL;
END_VAR
LR1 := DATETOTALDAYS(IN1 := D1);
END_PROGRAM

Description

Returns number of days since the beginning of our era (since 1.1. 0000) for a particular date.

Inputs

Input Type Description
IN1 ANY_DATE Input value

Outputs

Output Type Description
=> LREAL Output value

Application example



This function is used where the number of days between two dates has to be calculated.