Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

TimeMidNight

  • Last UpdatedJul 18, 2023
  • 1 minute read

Returns the number of seconds between midnight on January 1, 1970, and the midnight immediately prior to the specified time/date. This function is useful for performing calculations with the time and date.

Note: 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

TimeMidNight(Time)

Time:

The time/date variable.

Return Value

A time/date variable.

TimeCurrent

Example

timeNow = TimeCurrent();

! get the time variable at 7am today

time7am = TimeMidNight(timeNow) + 7*60*60;

IF timeNow > time7am AND timeNow < time7am + 10 THEN

Beep();

Prompt("Wake Up!");

END

See Also

Time and Date Functions

In This Topic
TitleResults for “How to create a CRG?”Also Available in