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

AVEVA™ Plant SCADA

Time

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets the current time in string format.

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

Time( [Format] )

Format:

The format of the time:

0 - Short time format, hh:mm AM/PM

1 - Long time format., hh:mm:ss AM/PM

If omitted, the default Format is 0.

Return Value

The current time (as a string).

Date, TimeToStr

Example

! If the current time is 10:45:30;

Variable=Time();

! Sets Variable to "10:45".

Variable=Time(0);

! Sets Variable to "10:45 AM".

Variable=Time(1);

! Sets Variable to "10:45:30 AM".

See Also

Time and Date Functions

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