FILETIME64_TO_SYSTEMTIME
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 variables is set. In this case the TIMESTRUCT member variables have the value zero.
FUNCTION FILETIME64_TO_SYSTEMTIME: TIMESTRUCT
VAR_INPUT
VAR_INPUT
fileTime : T_FILETIME64;
END_VAR
fileTime: The time to be converted in the FILETIME format (type: T_FILETIME64).
Sample:
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 |