FILETIME64_TO_SYSTEMTIME

FILETIME64_TO_SYSTEMTIME 1:

The function "FILETIME64_TO_SYSTEMTIME" converts the time in FILETIME format into the "readable" SYSTEMTIME format. The conversion fails if the most significant bit of the 64-bit fileTime variable is set. In this case the TIMESTRUCT member variables have the value zero.

FUNCTION FILETIME64_TO_SYSTEMTIME: TIMESTRUCT

FILETIME64_TO_SYSTEMTIME 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;
    timeAsSystemTime : TIMESTRUCT;
END_VAR
timeAsFileTime := F_GetSystemTime();
timeAsSystemTime := FILETIME64_TO_SYSTEMTIME( 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