SYSTEMTIME_TO_STRING
The function converts the Windows system time structure into a string with the following format: YYYY-MM-DD-hh:mm:ss.xxx :
- YYYY: year (1601..9999)
- MM: month (01..12)
- DD: day (01..31)
- hh: hour (00..23)
- mm: minutes (00..59)
- ss: seconds (00..59)
- xxx: millisecond (000..999)
FUNCTION SYSTEMTIME_TO_STRING : STRING(24)
Inputs
VAR_INPUT
in : TIMESTRUCT;
END_VAR
Name | Type | Description |
---|---|---|
in | The structure with the Windows system time to be converted |
Example:
PROGRAM MAIN
VAR
fbGetSystemTime : GETSYSTEMTIME;
fileTime : T_FILETIME;
sTime : STRING;
END_VAR
fbGetSystemTime(timeLoDW=>fileTime.dwLowDateTime, timeHiDW=>fileTime.dwHighDateTime );
sTime := SYSTEMTIME_TO_STRING( FILETIME_TO_SYSTEMTIME( fileTime ) );
Online view:
Requirements
Development environment |
Target platform |
PLC libraries to be integrated (category group) |
---|---|---|
TwinCAT v3.1.0 |
PC or CX (x86, x64, ARM) |
Tc2_Utilities (System) |