Dear kieuminh,
it is possible to convert STRING to TIME using the ANY_TO_TIME function but the input STRING must follow a specific input format, so that the XX..X digits will be converted to T#.....h...m..s...ms.
You can find more detailed information in zenon Logic help about the ANY_TO_TIME function:
Programming languages - Reference guide -> Type conversion functions -> ANY_TO_TIME
If you want to extrat the respective UNIX time from the STRING you can use the DT2UNIX function together with the MID (Extracts characters from text) and save the output in a LREAL variable (UNIX).
In this case, you can use STRING functions to assign the respective DD-MM-YYYY HH:mm to a TIME variable as below:
OUTTIME := DT2UNIX(ANY_TO_DINT(MID(CSVTIME,4,7)), ANY_TO_DINT(MID(CSVTIME,2,4)), ANY_TO_DINT(MID(CSVTIME,2,1)), ANY_TO_DINT(MID(CSVTIME,2,12)), ANY_TO_DINT(MID(CSVTIME,2,15)), 0, 0, 0, 0);
I used the following variable definition for testing:
VAR
CSVTIME : STRING(255) := '15-05-2019 09:00' ;
OUTTIME : LREAL ;
END_VAR
The code above can be part of function block to be easily reusable.
Good luck,
David Cerdeira