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

AVEVA™ Engineering

DATETIME Object

  • Last UpdatedMar 24, 2023
  • 3 minute read

Methods

Name

Result

Purpose

DateTime()

DATETIME

Create a DATETIME object with current date and time in it.

DATETIME(STRING)

DATETIME

Creates a local or a UTC date time, for example:

object DateTime('12:00 1 May 2018')

Or append UTC for UTC suffix:

object DateTime('12:00 1 May 2018 UTC').

DATETIME(BOOLEAN)

DATETIME

Creates a local (FALSE) or UTC (TRUE) date time object using the date time when created.

DateTime(REAL year, REAL month, REAL date)

DATETIME

Create a DATETIME set to the given year, month, date. Time defaults to 00:00:00.

DATETIME(REAL, REAL, REAL, BOOLEAN)

DATETIME

As above, but use the BOOLEAN argument to specify if the DATETIME object is Local (FALSE) or UTC (TRUE).

DateTime(REAL year, STRING month, REAL date)

DATETIME

Create a DATETIME set to the given year, month (using a STRING at least three characters long representing a month, for example, 'Jan', 'March', 'DECEM'), and date.

DATETIME(REAL, STRING, REAL, BOOLEAN)

DATETIME

As above, but use the BOOLEAN argument to specify if the DATETIME object is Local (FALSE) or UTC (TRUE).

DateTime(REAL year, REAL month, REAL date, REAL hour, REAL minute)

DATETIME

Create a DATETIME object set to a given year, month, date, hour, minute. Seconds default to 0.

DATETIME(REAL, REAL, REAL, REAL, REAL, BOOLEAN)

DATETIME

As above, but use the BOOLEAN argument to specify if the DATETIME object is Local (FALSE) or UTC (TRUE).

DateTime(REAL year, STRING month, REAL date, REAL hour, REAL minute)

DATETIME

Create a DATETIME object set to a given year, month (using a STRING at least three characters long representing a month, for example, 'Jan', 'March', 'DECEM'), date, hour, minute. Seconds default to 0.

DATETIME(REAL, STRING, REAL, REAL, REAL, BOOLEAN)

DATETIME

As above, but use the BOOLEAN argument to specify if the DATETIME object is Local (FALSE) or UTC (TRUE).

DateTime(REAL year, REAL month, REAL date, REAL hour, REAL minute, REAL second)

DATETIME

Create a DATETIME object set to a given year, month, date, hour, minute, second.

DATETIME(REAL, REAL, REAL, REAL, REAL, REAL, BOOLEAN)

DATETIME

As above, but use the BOOLEAN argument to specify if the DATETIME object is Local (FALSE) or UTC (TRUE).

DateTime(REAL year, STRING month, REAL date, REAL hour, REAL minute, REAL second)

DATETIME

Create a DATETIME object set to a given year, month (using a STRING at least three characters long representing a month, for example, 'Jan', 'March', 'DECEM'), date, hour, minute, second.

DATETIME(REAL, STRING, REAL, REAL, REAL, REAL, BOOLEAN)

DATETIME

As above, but use the BOOLEAN argument to specify if the DATETIME object is Local (FALSE) or UTC (TRUE).

Date()

REAL

Return day of month for this DATETIME object (1-31).

EQ(DATETIME)

BOOLEAN

Tests whether this DATETIME is the same as argument DATETIME. Local and UTC dates and times can be compared using the Current Time Zone.

GEQ(DATETIME)

BOOLEAN

Tests whether this DATETIME is later or the same as argument DATETIME. Local and UTC dates and times can be compared using the Current Time Zone.

GT(DATETIME)

BOOLEAN

Tests whether this DATETIME is later than argument DATETIME. Local and UTC dates and times can be compared using the Current Time Zone.

HOUR()

REAL

Returns hour as REAL for this DATETIME object (0-23).

LEQ(DATETIME)

BOOLEAN

Tests whether this DATETIME is earlier or the same as argument DATETIME. Local and UTC Dates times can be compared using the Current Time Zone.

LT(DATETIME)

BOOLEAN

Test whether this DATETIME is earlier than argument DATETIME. Local and UTC dates and times can be compared using the Current Time Zone.

Minute()

REAL

Return minutes as REAL for this DATETIME object (0-59).

Month()

REAL

Return month as REAL for this DATETIME object (1-12).

MonthString()

STRING

Return month as STRING for this DATETIME object (‘January’, ’February’, and so on).

Second()

REAL

Return number of seconds as REAL for this DATETIME object (0-59).

Year()

REAL

Return year as REAL (for example, 1998).

STRING()

STRING

Outputs the date and time as STRING, including seconds.

ISUTC()

BOOLEAN

Outputs a BOOLEAN that determines if this PML DATETIME is a UTC datetime.

TOUTC()

DATETIME

Convert this (Local) datetime to a UTC datetime using the current timezone. Returns a new UTC datetime object.

TOLOCAL()

DATETIME

Convert this (UTC) datetime to a Local datetime using the current timezone. Returns a new Local datetime object.

SET()

BOOLEAN

Returns TRUE if the year, month and date are all set.

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