DT_TO_TOD¶
Extracts the time-of-day portion from a date-and-time value.
Signature¶
┌─────────┐
IN ─┤DT_TO_TOD├─ OUT
└─────────┘
FUNCTION DT_TO_TOD : TIME_OF_DAY
VAR_INPUT
IN : DATE_AND_TIME;
END_VAR
END_FUNCTION
The return type is TIME_OF_DAY. IN is DATE_AND_TIME.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
The date-and-time to extract the time-of-day from. |
Outputs
Name |
Type |
Description |
|---|---|---|
Return value |
|
The time-of-day portion of IN. |
Description¶
Extracts the time-of-day portion from IN, returning a TIME_OF_DAY
value in milliseconds since midnight.
The long-form alias DATE_AND_TIME_TO_TIME_OF_DAY is also supported.
Example¶
result := DT_TO_TOD(DT#2000-01-01-12:00:00);
See Also¶
DT_TO_DATE — extract date from datetime
CONCAT_DATE_TOD — combine date and time-of-day