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

AVEVA™ Plant SCADA

TimeIntToTimestamp

  • Last UpdatedJul 18, 2023
  • 1 minute read

Converts a time INTEGER which is represented as a number of seconds since 01/01/1970 to a TIMESTAMP.

Syntax

TimeIntToTimestamp(INT TimeInt [, INT Millisecond [, INT UTC]])

TimeInt:

The number of seconds since 01/01/1970.

Millesecond:

The number of milliseconds since last second (optional).

UTC:

Coordinated Universal Time (optional):

0 – The given time INTEGER is a local date/time.

1 – The given time INTEGER is a UTC date/time (default).

Return Value

A TIMESTAMP variable or INVALID_TIMESTAMP if invalid.

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

Example

INT TimeInt = TimeCurrent();

TIMESTAMP t1 = TimeIntToTimestamp(TimeInt);

STRING sTimestamp = TimestampToStr(t1, 0, 0);

// sTimestamp equals current time in the short time format

// i.e. ‘HH:MM AM/PM’

See Also

Timestamp Functions

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