Table of Contents

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

InputType Description
IN1 ANY_DATEInput value

Outputs

OutputType Description
LREALOutput value

Application example



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