How Discord timestamp codes work

Updated

Type <t:1798747200:F>: the letter t, a Unix time in seconds and an optional style letter, all inside angle brackets. Discord replaces the code with that moment written in each reader’s own time zone and language, so one message is right for everyone. The Discord timestamp generator builds the code from a date you pick.

Discord timestamp syntax<t:opens the code1798747200Unix time, in seconds:Rstyle letter (optional)>closes it
Discord timestamp syntax

A timestamp with the default style

You type
The New Year’s Eve party starts <t:1798747200>
Discord shows
YouToday at 4:20 PM

The New Year’s Eve party starts December 31, 2026 at 8:00 PM

Without a style letter Discord uses f, long date with short time. The preview shows the moment in your browser’s time zone, the way Discord shows it in each reader’s.

All nine styles

You type
t  <t:1798747200:t>
T  <t:1798747200:T>
d  <t:1798747200:d>
D  <t:1798747200:D>
f  <t:1798747200:f>
F  <t:1798747200:F>
s  <t:1798747200:s>
S  <t:1798747200:S>
R  <t:1798747200:R>
Discord shows
YouToday at 4:20 PM

t 8:00 PM T 8:00:00 PM d 12/31/2026 D December 31, 2026 f December 31, 2026 at 8:00 PM F Thursday, December 31, 2026 at 8:00 PM s 12/31/2026, 8:00 PM S 12/31/2026, 8:00:00 PM R in 0 seconds

The same moment nine ways. Upper and lower case are different styles: t is a short time, T adds seconds; d is a numeric date, D spells the month out.

Date and countdown together

You type
Raid night: <t:1798747200:F> (<t:1798747200:R>)
Discord shows
YouToday at 4:20 PM

Raid night: Thursday, December 31, 2026 at 8:00 PM (in 0 seconds)

A common pattern for events: F gives the full date with the weekday, R says how far away it is.

Showing the code as text

You type
Type `<t:1798747200:R>` and Discord shows <t:1798747200:R>
Discord shows
YouToday at 4:20 PM

Type <t:1798747200:R> and Discord shows in 0 seconds

Inline code shows the characters as typed; outside the backticks the same code becomes a live time.

What does each part of a Discord timestamp mean?

Discord’s developer reference lists two forms under message formatting: <t:TIMESTAMP> and <t:TIMESTAMP:STYLE>. The angle brackets and the lowercase t mark the code, the number is a Unix timestamp, and the optional letter after the second colon picks how the moment is written. The reference states that timestamps are expressed in seconds and are displayed in the user’s time zone and locale.

That last sentence is the whole point of the feature. A plain “8 PM” means a different moment to every reader; a timestamp code holds one exact moment, and Discord does the conversion for each person who reads it. Someone in Tokyo and someone in New York see different clock times for the same code, and both are right. Because the code is message markdown, it works the same whether a person types it or a bot sends it.

Which timestamp styles does Discord support?

Nine, listed in the developer reference with the example outputs below. The letters are case-sensitive: t and T, d and D, f and F, s and S are four pairs of related styles, and R stands alone. Leaving the letter out is the same as f.

The examples come from Discord’s documentation and use its locale; the exact order and punctuation follow each reader’s own language settings, so the same code can read 20/04/2021 for one person and in another order for someone else. Only the moment is fixed.

StyleNameExample output
tShort time16:20
TMedium time16:20:30
dShort date20/04/2021
DLong dateApril 20, 2021
f (default)Long date, short timeApril 20, 2021 at 16:20
FFull date, short timeTuesday, April 20, 2021 at 16:20
sShort date, short time20/04/2021, 16:20
SShort date, medium time20/04/2021, 16:20:30
RRelative time4 years ago

How do you get the Unix timestamp for a date?

A Unix timestamp is the number of seconds since 1 January 1970, 00:00 UTC. The quickest route is the Discord timestamp generator: pick the date, time and time zone and copy any of the nine codes with the number already filled in. It also decodes a code you paste in, so you can check what moment someone else’s timestamp stands for.

If you prefer a terminal or code: date +%s prints the current Unix time in most shells, Math.floor(Date.now() / 1000) does it in JavaScript, and int(time.time()) in Python. Mind the unit: Discord wants seconds, and JavaScript’s Date.now() returns milliseconds. A 13-digit number is a millisecond value; divide it by 1,000 before putting it in the code.

How do time zones work with Discord timestamps?

There is no time zone in the code, and that is deliberate. A Unix time is the same number everywhere on Earth, so Discord can take that one number and write it out in each reader’s zone and locale, as its developer reference says. You never convert anything for your readers; you only need the right Unix number for the moment you mean, which is why the generator asks for the time zone you are thinking in.

The relative style R is special in one way: it is written from the reader’s point of view at the time they look at the message, so “in 2 hours” for someone reading now is “in 5 minutes” for someone reading later, and “3 days ago” the week after. Pair it with an absolute style such as F when the exact date matters.

Where do Discord timestamps not render?

Inside inline code and code blocks, which show text as typed. That is how to display the code itself, for example when you are explaining timestamps to someone. Outside code, the format has to match one of the two documented forms exactly: lowercase t, colons, digits only, one of the nine letters, no spaces, both angle brackets. Anything else is not a timestamp.

Discord’s developer reference lists timestamps under message formatting, which is what bots and people both send as message content. It does not say which parts of an embed render them, so test an embed layout before you rely on a timestamp in a title, field or footer.

What is the Discord timestamp format?

The format is <t:UNIX:STYLE>, where UNIX is a Unix time in seconds and STYLE is one of nine letters: t, T, d, D, f, F, s, S or R. The style is optional; <t:1798747200> alone uses f, long date with short time. Discord’s developer reference documents both forms and says the result is shown in each reader’s own time zone and locale.

How do you make a countdown timer on Discord?

Use the relative style: <t:1798747200:R> reads as “in 3 days” or “in 20 minutes” depending on when the reader looks, and switches to “2 hours ago” once the moment has passed. It is text that Discord writes from the reader’s point of view, not a ticking clock, so pair it with an absolute style such as <t:1798747200:F> when people need the exact date and time as well.

Why does my Discord timestamp show as plain text?

The code does not match the documented form. Check for a lowercase t, two colons at most, digits only in the number, one of the nine style letters, no spaces, and both angle brackets. Also check the number itself: Discord wants seconds, so a 13-digit millisecond value gives a date thousands of years away rather than the one you meant. And a code inside backticks is shown as typed on purpose, since inline code turns formatting off.

Do Discord timestamps work on mobile?

The timestamp code is message markdown, and Discord’s developer reference describes it without any platform restriction: the moment is displayed in the user’s time zone and locale wherever the message is read. The only difference on a phone is typing it: the angle brackets and colon are on the symbols page of the keyboard, so most people copy the code from a generator and paste it into the message.

Can you set a time zone in a Discord timestamp?

No, and you do not need to. The code holds a Unix time, which is one exact moment that is the same everywhere; Discord then shows that moment in each reader’s own zone. If you want to say “8 PM Eastern”, convert that to a Unix time once, with the generator or a calendar, and send the code. Everyone sees it as their own local time, and nobody has to do the arithmetic.

Sources

Related

Discord timestamp generator · Discord markdown cheat sheet · Discord headers · Discord hyperlinks · Discord code block

More Discord formatting: Strikethrough · Small text (subtext) · Big text · Code block · Colored text · Spoiler · Bold, italics, underline · Hyperlinks · Bullet points · Headers · Block quote · Escape characters