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

AVEVA™ Plant SCADA

TimestampGetPart

  • Last UpdatedJul 18, 2023
  • 1 minute read

Returns one part (year, month, day, etc) of the TIMESTAMP variable.

Syntax

TimestampGetPart(TIMESTAMP Timestamp, INT Part [, INT bUtc])

Timestamp:

The timestamp from which the part will be extracted.

Part:

Indicates which part to extract:

0 – The year part

1 – The month part.

2 – The day part.

3 – The hour part.

4 – The minute part.

5 – The second part.

6 – The millisecond part.

7 - The number of milliseconds since midnight last occurred.

bUtc:

Coordinated Universal Time (optional):

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

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

Return Value

The required part of the TIMESTAMP variable.

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

Example

TIMESTAMP t1;

// insert code here

INT year = TimestampGetPart(t1, 0);

INT second = TimestampGetPart(t1, 5);

See Also

Timestamp Functions

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