Using the current date and time in your bot application can be helpful—whether you're displaying it to users or passing it as a variable.
In this guide, you'll learn how to use the utcNow()
expression to retrieve the current date in UI Builder.
The utcNow()
expression can be used anywhere in your conversation flow to get the current date and time in UTC format. You'll also learn how to:
Before following this guide, you should be familiar with:
First, we’ll create a trigger in UI Builder that responds to specific user phrases, and then store the current date in a variable that can be used throughout the conversation flow.
<aside> 💡
In this example, we'll create a trigger to return today's date, but you can adapt these steps to your own use case, flow, or custom event.
</aside>