Hello,
The function Day_Time_local only offers STRING output. Is it possible to get a DINT value output?
In order to get a DINT value output (milliseconds since midnight) you can use the following ST code:



//Variable declaration
VAR
Q : DINT ;
strTime : STRING(8) ;
strH : STRING(2) ;
strM : STRING(2) ;
strS : STRING(2) ;
diH : DINT ;
diM : DINT ;
diS : DINT ;
diHCur : DINT ;
diMCur : DINT ;
diSCur : DINT ;
diTimeCur : DINT ;
Q1000 : DINT ;
Qms : DINT ;
diTimeCurMs : DINT ;
END_VAR


//ST code

strTime := day_time_local(1);

strH := left(strTime, 2);
strM := mid( strTime, 2, 4);
strS := right(strTime, 2);

diH := any_to_dint(strH);
diM := any_to_dint(strM);
diS := any_to_dint(strS);

diHCur := diH * 3600;
diMCur := diM * 60;
diSCur := diS;

diTimeCur := (diHCur + diMCur + diSCur) * 1000;

//optional with milliseconds:
//Q := DTCurTime ();
//Q1000 := Q / 1000;
//Qms := Q - (Q1000*1000);
//diTimeCurMs := diTimeCur + Qms;