Date break down

(Dan Rez) #1

Hello,

I’m new to bot building, so I apologize a head if I sound like a newbie.

I want to build a bot where the user is asked to input a full date DD-MM-YYYY, and the output he receives is only the year part (YYYY). I read the Date & Time Handling User Guide but I wasn’t able to really understand how do Implement.

Dan.

(Daniel Beckett) #2

Hi @Dan_Rez

First you’d setup a question to capture a date from the user:

Then you’d use the Date & Time service which is under ‘More Services’ when you add a new action:

Select the ‘Format Date’ action

Then you’d insert the output from the question into the Date/Time field by using the ‘XO’ icon

And then set a custom format of YYYY by clicking on the pencil icon

You can then use this as an output in a message back to the user:

Here’s an example flow showing how the full setup looks:

I hope that helps!

Thanks,
Dan

(Dan Rez) #3

Thank you so much :grinning::grinning: