DECOMPOSETIME
PROGRAM DECOMPOSETIME_DEMO
VAR
DT1: DT;
O1,MS:INT;
H,M,S:SINT;
END_VAR
O1 := DECOMPOSETIME(T := DT1, HOURS => H, MINUTES => M, SECONDS => S, MILLISECONDS => MS);
END_PROGRAM
Converts a DATETIME variable to individual time components as integer values.
Input | Type | Description |
---|---|---|
T | DT | Input value |
Output | Type | Description |
---|---|---|
=> | INT | Output value, 1 means that the conversion has been executed successfully |
HOURS | INT | number of hours |
MINUTES | SINT | number of minutes |
SECONDS | SINT | number of seconds |
MILLISECONDS | INT | number of miliseconds |