FILETIME64_TO_ISO8601

The function converts the Windows system time in T_FILETIME64 format into a string in ISO 8601 format.

The result corresponds to the following scheme: YYYY-MM-DDThh:mm:ss.xxxTZD

FUNCTION FILETIME64_TO_ISO8601 : STRING(39)

FILETIME64_TO_ISO8601 1: Inputs

VAR_INPUT
    fileTime   : T_FILETIME64; (* Time to be converted (file time format), 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 *)
    nBias      : INT;          (* Specifies the current bias, in minutes, for local time translation on this computer.
                                The bias is the difference, in minutes, between Coordinated Universal Time (UTC) and local time.
                                UTC = local time + bias *)    
    bUTC       : BOOL;         (* Specifies whether the fileTime is UTC or local time. *)
    nPrecision : USINT(0..9);  (* Precision. Number of decimal places of seconds. (0..9) *)
END_VAR

Name

Type

Description

fileTime

T_FILETIME64

The time to be converted in FILETIME format

nBias

INT

Indicates the current time offset in minutes between Coordinated Universal Time (UTC) and the local time. The following applies: UTC = local time + time offset

bUTC

BOOL

Indicates whether the time specified at the input corresponds to UTC or local time.

nPrecision

USINT(0..9)

Specifies the accuracy of the seconds display as the number of decimal places.

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.46.0