1735665749), which are great for computers but confusing for humans.
This guide shows you how to convert these numbers into friendly formats like “Tuesday, December 31st, 2024” or interpret natural language input like “next Friday at 2 PM.”
Common System Fields
Before formatting, identify which time data you are working with:| Variable | Description |
|---|---|
{{current_time}} | The bot’s current server time (Unix Timestamp). |
{{current_user_time}} | The user’s local time (if available). |
{{last_interaction}} | Timestamp of the user’s last message/action. |
Formatting Methods
- Method A: Native Tool (Recommended)
- Method B: AI Interpretation
Use the built-in Format Date action for reliable, standard conversions (e.g., displaying a receipt date).
Select Input Field
Choose the variable containing the timestamp you want to convert (e.g.,
{{current_time}} or a custom field like {{appointment_timestamp}}).Define the Pattern
Enter a formatting pattern string. The system uses standard PHP-style date characters.
- Example Pattern:
l, F jS, Y, g:i a - Result: “Tuesday, December 31st, 2024, 12:22 pm”
Set Time Zone
- Page Time Zone: Uses your bot’s default setting.
- User Time Zone: Adapts to the user’s device location (best for reminders).
- Custom: Force a specific zone like
UTCorEST.
Formatting Reference Sheet
Use these characters to construct your Format Pattern.Date Components
| Code | Description | Example |
|---|---|---|
d | Day (2 digits) | 01 to 31 |
j | Day (no leading zero) | 1 to 31 |
S | Ordinal Suffix | st, nd, rd, th |
l | Full Day Name | Tuesday |
D | Short Day Name | Tue |
F | Full Month Name | December |
M | Short Month Name | Dec |
m | Month (digits) | 12 |
Y | Year (4 digits) | 2024 |
Time Components
| Code | Description | Example |
|---|---|---|
g | 12-hour format (no zero) | 1 to 12 |
h | 12-hour format (w/ zero) | 01 to 12 |
H | 24-hour format | 00 to 23 |
i | Minutes | 00 to 59 |
a | am/pm (lowercase) | pm |
A | AM/PM (uppercase) | PM |
Practical Examples
1. Friendly Receipt Header
Pattern:l, F jS
Output: “Friday, October 24th”
2. Standard Database Format
Pattern:Y-m-d H:i:s
Output: “2024-10-24 14:30:00”
3. Chat Message Reminder
Pattern:g:i A on D, M j
Output: “2:30 PM on Fri, Oct 24”
