DateTime
- Namespace
- TcLogLib
Generate time data in different formats.
FUNCTION_BLOCK DateTime
Properties
AsLocalFileTime
Returns local time as Tc2_Utilities.T_FILETIME
.
PROPERTY AsLocalFileTime : Tc2_Utilities.T_FILETIME
Property Value
- Tc2_Utilities.T_FILETIME
AsLocalSystemTime
Returns local time as Tc2_Utilities.TIMESTRUCT
.
PROPERTY AsLocalSystemTime : Tc2_Utilities.TIMESTRUCT
Property Value
- Tc2_Utilities.TIMESTRUCT
AsLocalSystemTimeString
Returns local time as string.
PROPERTY AsLocalSystemTimeString : Tc2_System.T_MAXSTRING
Property Value
- Tc2_System.T_MAXSTRING
AsUtcFileTime
Returns UTC time as Tc2_Utilities.T_FILETIME
.
PROPERTY AsUtcFileTime : Tc2_Utilities.T_FILETIME
Property Value
- Tc2_Utilities.T_FILETIME
Done
When calling DateTime
the first time, it takes some time until all time and timezone information is available.
Done
is TRUE
for one cycle, once all the data is ready.
PROPERTY Done : BOOL
Property Value
- BOOL
Methods
ToFormatString
Returns a formatted string containing the actual time information
Y
: yearM
: monthD
: dayh
: hourm
: minutes
: secondi
: millisecond
Example:
YYMMDD-hh:mm:ss:iii
=> 20210812-12:30:22:123
METHOD ToFormatString (
format : STRING) : Tc2_System.T_MaxString
Inputs
Returns
- Tc2_System.T_MaxString