Slack Date Formatter
Build Slack's <!date^...> markup without looking up the syntax. Pick a time, compose the format from Slack's tokens, and copy markup that shows in each reader's own timezone.
When is it?
Where the event happens. Readers still see their own time.
Seconds since 1970. What your code already has.
How should it read?
Your own words plus tokens in braces. Click a token below to insert it where the cursor is.
For the preview and the Block Kit example.
Makes the date clickable.
Shown where Slack cannot format the date. Include the timezone.
Copy it
Pick a valid time firstPaste into the text of chat.postMessage, an incoming webhook, or a section block.
Decode existing markup
Finds every <!date^...> in it and explains each part.
Runs in your browser. Nothing you type is sent anywhere, and there is no signup or limit.
Why not just type the time?
“Deploy at 3pm” is correct for the person who wrote it and wrong for most of a distributed team. The usual fixes, adding “ET” or listing three timezones, push the arithmetic onto every reader and still miss someone. Slack's date markup stores the moment itself. Each person's Slack converts it, so the same message reads 3:00 PM in New York, 20:00 in London and 1:30 AM tomorrow in Bengaluru.
It only works in messages that an app sends. That is where it matters most anyway: deploy notices, on-call handoffs, meeting reminders, incident timelines and anything a workflow or bot posts on a schedule.
Choosing tokens
- {date_long_pretty} at {time} for meetings: it says “tomorrow at 9:00 AM” when that is true and the full weekday and date when it is not.
- {date_num} {time_secs} for logs and audit trails, where sorting and precision matter more than friendliness.
- {ago} for “last deployed” and “opened” lines. It is relative to the moment the message is displayed.
- {date_short} inside tables and field lists, where width is limited.
- {time} alone only when the day is already clear from the sentence.
The _pretty tokens are the ones people forget and then miss. A reminder that says “today” gets acted on faster than one that makes the reader check a date against a calendar.
When it shows as plain text
- It was typed into the Slack app. The composer does not parse date markup. Send it through the API, a bot or an incoming webhook.
- Milliseconds instead of seconds.
Date.now()in JavaScript returns milliseconds. Divide by 1000 and round down. The decoder above flags this. - The field is plain_text. Button labels, header blocks and other
plain_textobjects never format dates. Use a section block withmrkdwn, or a rich text date element. - A stray character. A missing
!, a|inside the format, or an unclosed>breaks the tag. The generator removes characters that would end it early. - Escaped angle brackets. If your code HTML-escapes the message,
<arrives as<and Slack shows the tag as text.
If the message is rejected outright, the Slack API error list explains each code, and the Slack message formatter checks the rest of your text and blocks against Slack's limits.
mrkdwn or the Block Kit date element
The <!date^...> form works anywhere Slack accepts mrkdwn: the top-level text of a message, section blocks, context blocks and attachment text. It is one string, so it suits webhooks and quick scripts.
The date element is the same idea as structured JSON inside a rich_text block, with timestamp, format and optional url and fallback fields. Use it when you are already building rich text, since there is nothing to escape. The Block Kit tab above gives you a complete block you can paste into Block Kit Builder to check.
A Slack chatbot built in Conferbot can post reminders and answers with dates handled this way, without you writing the message code.
Frequently asked questions
How do I show a date in each person's timezone in Slack?
Use Slack's date markup instead of typing the time. Write <!date^1767225600^{date_long} at {time}|Jan 1, 2026 00:00 UTC> in a message sent by an app, bot or webhook, and Slack replaces it with the date and time converted to each reader's own timezone and their 12 or 24 hour setting.
What is the syntax of Slack date formatting?
It is <!date^timestamp^format^link|fallback>. The timestamp is Unix time in seconds. The format is your own text with tokens such as {date_short} and {time}. The link is optional and makes the date clickable. The fallback after the vertical bar is plain text shown by clients that cannot format dates.
Which date tokens does Slack support?
{date_num}, {date}, {date_short}, {date_long}, the three _pretty versions that say yesterday, today or tomorrow, {time}, {time_secs} and {ago}. You can combine several in one format and put ordinary words around them, for example Due {date_short_pretty} at {time}. Anything in braces that is not one of these is printed exactly as typed.
Why does Slack show my date markup as plain text?
Three usual causes. The message was typed by a person in the Slack app, where this markup is not parsed: it works in messages sent through the API, a bot or an incoming webhook. The timestamp is in milliseconds instead of seconds. Or the text is in a field that is not mrkdwn, such as a plain_text block element.
Can I type date markup straight into Slack?
No. Slack's composer treats it as ordinary text. Date formatting is for messages created by apps: chat.postMessage, incoming webhooks, workflow steps that send mrkdwn, and Block Kit rich text with a date element. If you need it by hand, send the message through a webhook or a workflow step instead.
What should the fallback text say?
A complete date with its timezone, for example Feb 18, 2014 6:39 AM PST. The fallback is not converted, so without a timezone a reader on an old client or in a notification cannot tell when it is. This generator writes one for you from the time and timezone you entered.
What is the difference between the mrkdwn form and the Block Kit date element?
They produce the same result. The <!date^...> form goes inside any mrkdwn text, including section blocks and the top-level text of a message. The date element is JSON for rich_text blocks, with timestamp, format, and optional url and fallback fields. Use whichever matches how you already build the message.
Does the time update for daylight saving?
Yes. The markup stores one exact instant. Slack converts it for each reader at the moment the message is shown, using the rules of their timezone on that date, so nobody has to know whether a colleague is on summer or winter time.
Related
Let a bot send the reminders
Build a Slack chatbot that answers your team, takes requests and posts reminders with the time right for everyone. No code, free plan, no card.