Cicode Programming Reference > Cicode Function Categories > Time and Date Functions Introduction > TimeCurrent

TimeCurrent

Gets the current system time/date in time/date variable format. Please be aware that CitectSCADA stores time as the number of seconds since 01/01/1970. You can convert this value into usable date and time variables by using the various Date and Time functions.

Time/date functions can only be used with dates between 1980 and 2035. You should check that the date you are using is valid with Cicode similar to the following:

IF StrToDate(Arg1)>0 THEN
...
ELSE
...
END

Syntax

TimeCurrent()

Return Value

A time/date variable.

Related Functions

StrToDate, StrToTime

Example

! If the current system time is 11:43:10 a.m.;
TimeVariable=TimeToStr(TimeCurrent(),0);
! Sets TimeVariable to "11:43".

See Also

Time/Date Functions