FILETIME64_TO_DT

FILETIME64_TO_DT 1:

The function "FILETIME64_TO_DT" converts the time in FILETIME format to DATE_AND_TIME format (DT). The DT format has a smaller value range than the FILETIME format and only offers second accuracy. For this reason the FILETIME value to be converted is limited. The permitted minimum corresponds to value DT#1970-01-01-00:00:00 and the maximum to value DT#2106-02-06-06:28:15. Milliseconds are not considered in the conversion and are rounded down to the DATE_AND_TIME return value accordingly.

FUNCTION FILETIME64_TO_DT : DT

FILETIME64_TO_DT 2: Inputs

VAR_INPUT
    fileTime : T_FILETIME64;
END_VAR

Name

Type

Description

fileTime

T_FILETIME64

The time to be converted in FILETIME format

Example:

PROGRAM MAIN
VAR
    timeAsFileTime : T_FILETIME64;
    timeAsDT       : DT;
END_VAR
timeAsFileTime := F_GetSystemTime();
timeAsDT := FILETIME64_TO_DT( timeAsFileTime );

Requirements

Development environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.4024

PC or CX (x86, x64, ARM)

Tc2_Utilities (System) >= 3.3.44.0