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

AVEVA™ Plant SCADA

TimestampAdd

  • Last UpdatedJul 18, 2023
  • 1 minute read

Adds an offset to a TIMESTAMP variable.

Syntax

TimestampAdd(TIMESTAMP Timestamp, INT Offset [, INT Part])

Timestamp:

The timestamp to which Offset will be added

Offset:

The offset to add, expressed in units of the part parameter

Part:

Indicates which part to add:

0 – Offset is in years.

1 – Offset is in months.

2 – Offset is in days.

3 - Offset is in hours.

4 - Offset is in minutes.

5 - Offset is in seconds (default)

6 - Offset is in milliseconds

Return Value

The TIMESTAMP variable, or INVALID_TIMESTAMP if invalid.

TimestampCurrent, TimestampDifference, TimestampSub, TimestampToStr, TimeIntToTimestamp, TimestampCreate, TimestampFormat, TimestampGetPart, TimestampToTimeInt

Example

TIMESTAMP t1 = TimestampAdd(Tag1.T, 100); // 100 seconds

TIMESTAMP t2 = TimestampAdd(Tag1.T, 1, 0); // 1 year

See Also

Timestamp Functions

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