Date and Time Functions
Date and Time functions are used in calculated tag expressions to retrieve, convert, manipulate, and evaluate date and time values. These functions support time-zone conversion, extraction of date components, and calculation of date-based values.
Function Reference:
|
Function |
Name |
Description |
Format |
Returned Value |
|---|---|---|---|---|
|
now |
Trigger Time (Local) |
Returns the local trigger time that invoked the calculation. |
|
DateTime |
|
utcnow |
Trigger Time (UTC) |
Returns the UTC trigger time that invoked the calculation. |
|
DateTime |
|
yday |
Yesterday Date |
Returns the previous day with the time set to 12:00:00 AM. |
|
DateTime |
|
today |
Today Date |
Returns the current date with the time set to 12:00:00 AM. |
|
DateTime |
|
mintime |
Minimum Time |
Returns the minimum DateTime value supported by the system. |
|
DateTime |
|
maxtime |
Maximum Time |
Returns the maximum DateTime value supported by the system. |
|
DateTime |
|
tolocal |
Convert to Local Time |
Converts a UTC timestamp to local time. |
|
DateTime |
|
toutc |
Convert to UTC Time |
Converts a local timestamp to UTC. |
|
DateTime |
|
isdst |
Is Daylight Saving Time |
Returns whether the specified timestamp falls within daylight saving time. |
|
Boolean |
|
noon |
Noon Time |
Returns the specified date with the time set to 12:00:00 PM. |
|
DateTime |
|
bday |
Beginning of Day |
Returns the specified date with the time set to 12:00:00 AM. |
|
DateTime |
|
bmonth |
Beginning of Month |
Returns the first day of the specified month at 12:00:00 AM. |
|
DateTime |
|
byear |
Beginning of Year |
Returns the first day of the specified year at 12:00:00 AM. |
|
DateTime |
|
second |
Second Fragment |
Returns the second component of a timestamp. |
|
Integer |
|
minute |
Minute Fragment |
Returns the minute component of a timestamp. |
|
Integer |
|
hour |
Hour Fragment |
Returns the hour component of a timestamp. |
|
Integer |
|
day |
Day Fragment |
Returns the day component of a date. |
|
Integer |
|
month |
Month Fragment |
Returns the month component of a date. |
|
Integer |
|
year |
Year Fragment |
Returns the year component of a date. |
|
Integer |
|
yearday |
Day of Year |
Returns the day number within the year. |
|
Integer |
|
weekday |
Day of Week |
Returns the day of the week as an integer from 0 to 6. |
|
Integer |
|
dayseconds |
Day Total Seconds |
Returns the number of elapsed seconds within the day. |
|
Integer |