Getting Dates and Times

These procedures are used to get current date and time information.

1. Get the Current Date

Returns the current date in MM-DD-YYYY format, such as 01-23-2025.

get the current date

2. Get the Current Time

Returns the current time in HH:MM:SS.ssssss format, such as 10:29:58.348854 .*

get the current time

*By default, the current time is returned in Coordinated Universal Time (UTC). To get the current time in a specific time zone, see Setting the Time Zone.

3. Get the Current Year

Returns the current year in the format YYYY, such as 2025.

get the current year

4. Get the Current Month

Returns the current month by name, such as February.

get the current month

5. Get the Current Day

Returns the current day by name, such as Thursday.

6. Get the Current Hour

Returns the current hour in 12-hour format along with AM/PM. For example: 02PM.


Setting the Time Zone

To set a specific time zone for your agent, use the following procedure, replacing zone with your desired time zone:

Examples

Supported Timezones

This is a complete list of all the currently supported time zones.

Last updated

Was this helpful?