{"id":22083,"date":"2022-09-06T11:42:19","date_gmt":"2022-09-06T09:42:19","guid":{"rendered":"https:\/\/botnation.ai\/support\/capture-a-date-3\/"},"modified":"2026-02-25T14:07:17","modified_gmt":"2026-02-25T13:07:17","slug":"capture-a-date-3","status":"publish","type":"support","link":"https:\/\/botnation.ai\/en\/support\/capture-a-date-3\/","title":{"rendered":"Capture a date"},"content":{"rendered":"<p>Save date and time as variables<\/p>\n\n<p>The \u201cDate and time\u201d function lets your users easily enter a date and time to inform your chatbot about an appointment, a birth date, a desired reservation period, etc\u2026 Whether on your Web chatbot or Facebook Messenger!<\/p>\n\n<p>On Messenger, the \u201cDate and Time\u201d feature creates a pre-configured button that will open a WebView with a visual calendar.<br><br>For web chatbots, there are two ways to capture a date: with a button that opens a new tab with a visual calendar as on Messenger, or integrated directly into the chat window.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Mockups_Calendrier_FR-1024x495.png.webp\" alt=\"\" class=\"wp-image-531\"><\/figure>\n\n<p>The information collected is automatically injected into variables that can be used in conditions and webhooks.<\/p>\n\n<p>First of all, let\u2019s clarify something you often ask us! Botnation AI has 2 types of date-related variables: <\/p>\n\n<ul class=\"wp-block-list\"><li>calendar_day<\/li><li>bn_date<\/li><\/ul>\n\n<p>Here, we\u2019ll take a look at the first. To find out how <strong>bn_date<\/strong> works, <a href=\"https:\/\/botnation.ai\/en\/?post_type=support&amp;p=22061\">click here<\/a>! <\/p>\n\n<p>You\u2019d like to ask your chatbot\u2019s user to enter a date using our calendar function. In this case, you\u2019ll find the value of this entry under the variable <strong>{{CALENDAR_DAY}<\/strong>}. They are static.  <\/p>\n\n<p>In case you\u2019d like to ask the chatbot for today\u2019s date, follow the guide \u2013 we\u2019ve detailed it all in <a href=\"https:\/\/botnation.ai\/en\/?post_type=support&amp;p=22061\">this article<\/a>.<\/p>\n\n<h2 class=\"wp-block-heading\">1. Use for Messenger<\/h2>\n\n<p>Among the construction functions, click on \u201cDate &amp; Time\u201d.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Calendar_00_FR_FBM-1024x604.png.webp\" alt=\"\" class=\"wp-image-551\"><\/figure>\n\n<p>This creates a pre-configured button.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Calendar_01_FR-1024x604.png.webp\" alt=\"\" class=\"wp-image-535\"><\/figure>\n\n<p>Clicking on the button title will open the button configuration panel directly to the \u201cDate and time\u201d tab.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Calendar_Button_01_FR-1-1024x932.png.webp\" alt=\"\" class=\"wp-image-545\"><\/figure>\n\n<p>Then fill in the required fields. You can propose the date or time individually, or both on the same interface. You can also select a color to personalize this menu.  <\/p>\n\n<p>For your chatbot users, this will display a button that, when clicked, will display a WebView.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"309\" height=\"96\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-73.png.webp\" alt=\"\" class=\"wp-image-539\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-73.png 309w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-73-300x93.png 300w\" sizes=\"(max-width: 309px) 100vw, 309px\" \/><\/figure>\n<\/div>\n<p>The visual interface is fluid and ergonomic, eliminating the need for your users to enter information by hand.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"904\" height=\"582\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-75.png.webp\" alt=\"\" class=\"wp-image-547\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-75.png 904w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-75-300x193.png 300w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\">2. Use for Web chatbots<\/h2>\n\n<h4 class=\"wp-block-heading\">A. Capture date and time from a button  <\/h4>\n\n<p>If you create a button and choose the \u201cDate and time\u201d tab in the configuration interface, the operation is exactly the same as for Messenger. This will create a button which, when clicked, will open a new tab in the browser with the visual date and time capture interface. <\/p>\n\n<h4 class=\"wp-block-heading\">B. Capture date and time using the \u201cDate and time\u201d function<\/h4>\n\n<p>Among the construction functions, click on \u201cDate &amp; Time\u201d.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Calendar_00_FR-1-1024x604.png.webp\" alt=\"\" class=\"wp-image-549\"><\/figure>\n\n<p>Then fill in the required fields. You can propose the date or time individually, or both on the same interface.   <\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Calendar_02_FR-1024x604.png.webp\" alt=\"\" class=\"wp-image-553\"><\/figure>\n\n<p>Your users can enter the date and time directly in the chatbot window, in the conversation flow.<\/p>\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"914\" height=\"577\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-76.png.webp\" alt=\"\" class=\"wp-image-555\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-76.png 914w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-76-300x189.png 300w\" sizes=\"(max-width: 914px) 100vw, 914px\" \/><\/figure>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>ATTENTION<\/strong><br>This feature can only be placed at the end of a sequence.<\/p><\/blockquote>\n\n<h2 class=\"wp-block-heading\">3. Collected variables<\/h2>\n\n<p>The dates and times collected are available in \u201cDate entry\u201d variables:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"341\" height=\"240\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-77.png.webp\" alt=\"\" class=\"wp-image-559\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-77.png 341w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-77-300x211.png 300w\" sizes=\"(max-width: 341px) 100vw, 341px\" \/><\/figure>\n<\/div>\n<p>The number of the day: {{CALENDAR_DAY}}<\/p>\n\n<p>The month number: {{CALENDAR_MONTH}}<br><br>The year: {{CALENDAR_YEAR}}<\/p>\n\n<p>Time: {{CALENDAR_HOUR}}<\/p>\n\n<p>The minutes: {{CALENDAR_MINUTE}}<br><br>The day of the week (from 1 (Sunday) to 7 (Saturday) ): {{CALENDAR_DAY_OF_WEEK}}<br><br>The number of the week (1..52): {{CALENDAR_WEEK_OF_YEAR}}<\/p>\n\n<p>Timestamp date format: {{CALENDAR_TIMESTAMP}}<\/p>\n\n<h2 class=\"wp-block-heading\">4. Options<\/h2>\n\n<p>A \u2013 You can leave your colleagues a comment about this feature by clicking on the icon (see below).<br>See article : <a href=\"https:\/\/botnation.ai\/en\/support\/add-comments\/\">Adding comments<\/a><\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/08\/Texte_06_FR-1-1024x604.png.webp\" alt=\"Add a comment\" class=\"wp-image-98\"><\/figure>\n\n<p>B \u2013 By clicking on the \u201c?\u201d icon, the online help will open on the article corresponding to this feature.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/08\/Texte_08_FR-1024x604.png.webp\" alt=\"Online help\" class=\"wp-image-100\"><\/figure>\n","protected":false},"featured_media":0,"template":"","meta":{"_acf_changed":false},"categorie-support":[194,222,221],"class_list":["post-22083","support","type-support","status-publish","hentry","categorie-support-features","categorie-support-variables-en","categorie-support-web-chatbot-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/support\/22083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/support"}],"about":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/types\/support"}],"wp:attachment":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/media?parent=22083"}],"wp:term":[{"taxonomy":"categorie-support","embeddable":true,"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/categorie-support?post=22083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}