GetDatetime

Returns the current date and/or time.

GetDatetime(
  format=Literal["datetime", "date", "time"] 
)

Example 1 (Date)

The code below sets a variable name "date_" and adds the date to it using the GetDatetime action. The SendMessage action outputs the result in the Sandbox chat. Ensure you set up an event subscription to activate this skill when sending a message in the Sandbox chat.

{{set(name='date_', value=GetDatetime(format= "date"))}}

{{SendMessage(message=date_)}}

Response: 2024-01-19

Example 2 (Time)

The code below sets a variable name "time_" and adds the time to it using the GetDatetime action. The SendMessage action outputs the result in the Sandbox chat. Ensure you set up an event subscription to activate this skill when sending a message in the Sandbox chat.

{{set(name='time_', value=GetDatetime(format= "time"))}}

{{SendMessage(message=time_)}}

Response: 09:47:19.479534

Example 3 (Date/Time)

The code below sets a variable name "datetime_" and adds the date/time to it using the GetDatetime action. The SendMessage action outputs the result in the Sandbox chat. Ensure you set up an event subscription to activate this skill when sending a message in the Sandbox chat.

{{set(name='datetime_', value=GetDatetime(format= "datetime"))}}

{{SendMessage(message=datetime_)}}

Response: 2024-01-19T09:47:19.479534