Applies To:
  • CitectSCADA v7.0 , v7.1 

Summary:
How to convert date format "19/01/2010 8:15:30"  into Date/Time variable of type INT in cicode, So it can be used in functions like TrnEventSetTable() , TrnSetTime() etc.

Solution:
This conversion can be done using the following cicode functions - StrtoDate() and StrtoTime() functions.

Example:

int n = 0;
n = StrtoDate("15/01/2010") + StrtoTime("8:40:00"); 
// n is the converted date/time variable that can be used in the TrnSetTime() function.
TrnSetTime(250,-1,n);

 


Keywords:
 Date, Time, TrnSetTime, TrnEventSetTable

Attachments