Reserved Variables
The variables in the following table are reserved system variables. They are read-only and only return information. You can use them in your script when you need the information they return.
Variable Name | Description |
---|---|
date |
Returns the current date based on the current time zone. String expression: Formats the date in the standard date format which is MM/DD/YYYY. Numeric expression: Returns the date as an OLE Automation date/time without the fractional portion. An OLE Automation Date is a date written as a floating point number. The left side of the decimal point is the number of days since midnight, December 30, 1899. The right side of the decimal point is the time on that day divided by 24. For example, 6:00 AM December 31, 1899 is 1.25. |
dow | Day of Week. Returns the ordinal value for the current day of week based on the current time zone, where Sunday is 0. |
gmt |
Returns the current Coordinated Universal (UTC) date and time. String expression: Formats the date/time in the standard RFC 1123 format which is DAY, DD MMM YYYY hh:mm:ss GMT. Example: “Mon, 03 Oct 2023 13:35:14 GMT”. Numeric expression: Returns the date/time as an OLE Automation date/time. See also utc.An OLE Automation Date is a date written as a floating point number. The left side of the decimal point is the number of days since midnight, December 30, 1899. The right side of the decimal point is the time on that day divided by 24. For example, 6:00 AM December 31, 1899 is 1.25. |
now |
Returns the current date and time based on the current time zone. String expression: Formats the date/time in the standard date and time format, which is MM/dd/yyyy hh:mm:ss tt. Numeric expression: Returns the date/time as an OLE Automation date/time. An OLE Automation Date is a date written as a floating point number. The left side of the decimal point is the number of days since midnight, December 30, 1899. The right side of the decimal point is the time on that day divided by 24. For example, 6:00 AM December 31, 1899 is 1.25. |
runscript | A reserved variable used in system scripts. |
test | Do not attempt to set this variable. Doing so may result in severe consequences. This is reserved for debugging code in a Snippet action. |
time |
Returns the current time based on the current time zone. String expression: Formats the time in the standard time format which is hh:mm:ss tt. Numeric expression:] Returns the time as an OLE Automation date/time with only the fractional portion. |
timeout | A reserved variable used in system scripts. |
timestamp |
Returns the number of 100-nanosecond intervals A period between points, limits, or events, such as dates or times that have elapsed since midnight on January 1, 0001 UTC. This can be used as an ever increasing number – guaranteed to be unique across time. It is a very large number of at least 18 digits. String expression: Returns the full 18+ digit number representing the current UTC timestamp. For example: 633911474194623828. Numeric expression: Returns a double precision (64-bit) floating point representation of the current UTC timestamp. The floating point value will be slightly less precise than the string representation. For example: 6.33911474194624E+17. |
timezoneid | Returns the ID of the current time zone. This is either set at the business unit High-level organizational grouping used to manage technical support, billing, and global settings for your CXone environment level or using the Timezone action. |
timezoneoffset | Returns the difference (in hours) between UTC and the current time zone and the current time and date. |
utc |
Returns the current Coordinated Universal (UTC) date and time. String expression: Formats the date/time in the standard date and time format which is MM/dd/yyyy h:mm:ss tt. Numeric expression: Returns the date/time as an OLE automation date/time. An OLE Automation Date is a date written as a floating point number. The left side of the decimal point is the number of days since midnight, December 30, 1899. The right side of the decimal point is the time on that day divided by 24. For example, 6:00 AM December 31, 1899 is 1.25. |
weekday | Returns the unabbreviated string representation of the current week day based on the current time zone. For example, Thursday. This is only applicable within a string expression. |