Formatting date and time is crucial for serving customers in different regions, as date and time formats vary across countries and cultures. ChitChatbot makes it easy to customize how your bot displays dates and times to match your users’ preferences.
Here’s a step-by-step guide to help you set up date and time formatting within your flows:
Step 1: Choose the Flow to Edit
Navigate to the flow where you want to format a date or time.
Step 2: Add the Action
In the flow’s block builder:
- Select the “Action” option.
- From the list of actions, choose “Format Date / Date & Time”.

Step 3: Configure the Format
Within the Format Date / Date & Time action, do the following:
✅ Select the Date Field
- Choose the custom field containing the date you want to format.
✅ Enter the Desired Format
- In the Format field, type the pattern you want to display.
For example, to show the date and time as23-01-2022; 02:00 a.m
, enter:d-m-Y; h-i a
- Refer to the table below for all available formatting parameters.
✅ Save the Formatted Date
- Either create a new custom field or select an existing one in the “Save the formatted date to” field.
✅ Set the Time Zone
- You can choose whether to format the date in the page’s time zone or the user’s time zone.
Finally, click Save to apply these settings.
Formatting Parameters for Date & Time
Character | Description | Example Values |
---|---|---|
Day | ||
d | Day of the month, 2 digits with leading zeros | 01 to 31 |
D | Short textual representation of a day (3 letters) | Mon through Sun |
j | Day of the month without leading zeros | 1 to 31 |
l | Full textual day of the week | Sunday through Saturday |
N | ISO-8601 numeric day of the week | 1 (Monday) to 7 (Sunday) |
S | English ordinal suffix (st, nd, rd, th) | st, nd, rd, th |
w | Numeric day of the week (0 for Sunday) | 0 to 6 |
z | Day of the year, starting from 0 | 0 to 365 |
Week | ||
W | ISO-8601 week number of year | 01 to 53 |
Month | ||
F | Full textual month (January, February, etc.) | January through December |
m | Numeric month with leading zeros | 01 to 12 |
M | Short textual month (3 letters) | Jan through Dec |
n | Numeric month without leading zeros | 1 to 12 |
t | Number of days in the given month | 28 to 31 |
Year | ||
L | Leap year indicator (1 for yes, 0 for no) | 0 or 1 |
o | ISO-8601 year (may differ from calendar year) | 1999, 2025, etc. |
Y | Four-digit year | 1999, 2025 |
y | Two-digit year | 99, 25 |
Time | ||
a | Lowercase am/pm | am, pm |
A | Uppercase AM/PM | AM, PM |
g | 12-hour format without leading zeros | 1 to 12 |
G | 24-hour format without leading zeros | 0 to 23 |
h | 12-hour format with leading zeros | 01 to 12 |
H | 24-hour format with leading zeros | 00 to 23 |
i | Minutes with leading zeros | 00 to 59 |
s | Seconds with leading zeros | 00 to 59 |
U | Unix timestamp (seconds since 1970-01-01 00:00:00 GMT) | e.g., 1717457692 |
Note:
TheU
format is particularly useful for math operations. For example, if you want to calculate how long a user takes to complete a quiz:({{stop}} - {{start}}) / 60
This calculates the total time in minutes! This would be a maths operation.
Example Format
If you want to display:
23-01-2022; 02:00 am
You would use the format string:
d-m-Y; h-i a
Key Tips
✅ Double-check the time zone settings to ensure accurate local time for your users.
✅ Store the formatted date in a separate custom field for easy use in your flows.
✅ Use the formatting parameters creatively to suit your audience’s region and language.