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

AVEVA™ Plant SCADA

TimestampToTimeInt

  • Last UpdatedJul 18, 2023
  • 1 minute read

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

Syntax

TimestampToTimeInt(TIMESTAMP Timestamp [, INT UTC])

Timestamp:

The timestamp variable.

UTC:

Coordinated Universal Time (optional):

0 – Returns the time as a local date/time.

1 – Returns the time as a UTC date/time (default)

Return Value

Time as a number of seconds since 01/01/1970 in UTC or local time depending on the last input parameter,-1 if invalid.

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

Example

TIMESTAMP t1 = TimestampCreate(2009,07,11,09,27,34,123);

INT TimeInt = TimestampToTimeInt(t1);

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

// sTimestamp equals ‘9:27 AM’

See Also

Timestamp Functions

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