Skip to content
DevPlainly

Discord Timestamp Generator

Pick a date and time and copy the code. Discord shows it to every member in their own time zone and language, so an event at 8 PM for you reads as the right time for everyone.

  • Short time…<t:…:t>
  • Long time…<t:…:T>
  • Short date…<t:…:d>
  • Long date…<t:…:D>
  • Date and time (default)…<t:…:f>
  • Full date and time…<t:…:F>
  • Relative…<t:…:R>

Everyone in the server sees the time converted to their own time zone and language, so you never have to write "8 PM EST / 2 AM CET" again.

How Discord timestamps work

A Discord timestamp is a short code with a Unix timestamp inside: <t:1798761600:F>. The number is the moment in time, the same everywhere in the world, and the letter at the end is the style. When you send the message, Discord replaces the code with a date written in each reader's own time zone and language. The code works in messages, and bots can send it too.

All Discord timestamp styles

The examples are how a reader with UK English settings sees the same moment.

CodeStyleExample
<t:1618953630:t>Short time16:20
<t:1618953630:T>Long time16:20:30
<t:1618953630:d>Short date20/04/2021
<t:1618953630:D>Long date20 April 2021
<t:1618953630:f>Date and time (default)20 April 2021 16:20
<t:1618953630:F>Full date and timeTuesday, 20 April 2021 16:20
<t:1618953630:R>Relative2 months ago

A code without a letter, like <t:1618953630>, uses the default f style. The relative style updates on its own: "in 2 hours" becomes "in 1 hour" and then "1 hour ago".

How to use it

  1. Pick the date and time above, in your own time zone, or paste a Unix timestamp.
  2. Copy the code for the style you want. For events, F plus R works well: the full date and a countdown.
  3. Paste it in your message. You'll see the code while typing and the date once it's sent.

Discord timestamps in bots

Both popular bot libraries have a helper, so you don't have to build the code by hand:

// discord.js (@discordjs/formatters)
import { time, TimestampStyles } from "@discordjs/formatters";
time(new Date("2027-01-01T00:00:00Z"));                            // <t:1798761600>
time(new Date("2027-01-01T00:00:00Z"), TimestampStyles.RelativeTime); // <t:1798761600:R>

# discord.py
import datetime, discord
dt = datetime.datetime(2027, 1, 1, tzinfo=datetime.timezone.utc)
discord.utils.format_dt(dt, style="R")                               # <t:1798761600:R>

We ran both with discord.js's formatters package and discord.py 2.7. Always pass a date with a time zone (UTC above): a date without one is read in the bot server's time zone, which may not be yours.

Frequently asked questions

Why does my Discord timestamp show the wrong time?

The number inside the code is probably wrong, usually because it was made from a time in the wrong time zone. Pick the time here in your own time zone and the code will be right for everyone. Also check your device's clock and time zone settings, because Discord converts using them.

Do Discord timestamps work on mobile?

Yes. They work in the desktop, web and mobile apps, and each one uses that device's time zone.

Can I use milliseconds?

No, Discord expects seconds (10 digits for current dates). If you paste a 13-digit millisecond timestamp above, the generator converts it to seconds for you.