DATETIME Object
- Last UpdatedOct 16, 2025
- 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 Date time 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 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 Date time 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 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 Date time 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 given year, month (using a STRING at least three characters long representing 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 Date time 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 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 Date time 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 given year, month (using a string at least three characters long representing 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 Date time 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 times can be compared using the Current Time Zone. |
|
GEQ(DATETIME) |
BOOLEAN |
Test whether this DATETIME is later than or the same as argument DATETIME. Local and UTC Dates times can be compared using the Current Time Zone. |
|
GT(DATETIME) |
BOOLEAN |
Test whether this DATETIME is later than argument DATETIME. Local and UTC Dates times can be compared using the Current Time Zone. |
|
HOUR() |
REAL |
Return hour as REAL for this DATETIME object (0-23). |
|
LEQ(DATETIME) |
BOOLEAN |
Test 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 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’, ) |
|
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 time as a string including seconds. |
|
ISUTC() |
BOOLEAN |
Outputs a boolean that determines if this PML date time is a UTC Date Time. |
|
TOUTC() |
DATETIME |
Convert this (Local) Date Time to a UTC Date Time using the current time zone. Returns a new UTC date time object. |
|
TOLOCAL() |
DATETIME |
Convert this (UTC) Date Time to a Local Date Time using the current time zone. Returns a new Local date time object. |
|
SET() |
BOOLEAN |
Returns true if the year, month and date are all set. |