DiscordTimestamp Converter
✓ Link copied!
TECHNICAL SYNTAX & DEVELOPER MANUAL

Discord Timestamp Syntax & Formatting Guide

A technical reference manual for server managers and bot developers. Master markdown tag structure, all 9 format flags, DST timezone rules, and programmatic bot integration.

01 / Quick Start

Quick Syntax Overview & Tag Rules

Step 1: Calculate the Unix timestamp. Convert your event date and timezone to a Unix epoch integer (seconds since 1 Jan 1970 UTC).

Step 2: Append the format flag. Wrap the number in Discord's tag syntax: <t:UNIX_SECONDS:FLAG>.

Step 3: Paste into Discord chat. Paste the tag into any Discord message box and press Enter. Discord renders it immediately for every viewer in their own local timezone.

Prefer to generate tags with a visual timezone picker?

Use our interactive converter with automatic timezone detection and live previews.

Open Discord Time Converter
02 / Syntax

The Anatomy of a Discord Timestamp

<t:1795856460:R>
1795856460 (Unix Epoch)Unix seconds since January 1, 1970 00:00:00 UTC. Always integer seconds, never milliseconds.
R (Style Flag)Single-letter flag dictating visual representation. If omitted, Discord defaults to f.
03 / Format Flags

Discord Timestamp Format Flags Reference

Discord supports 9 format styles to control how dates and times display in chat.

FlagFormat NameViewTimestamp
:tShort Time9:01 AM<t:1795856460:t>
:TLong Time (with seconds)9:01:00 AM<t:1795856460:T>
:dShort Date11/28/2026<t:1795856460:d>
:DLong DateNovember 28, 2026<t:1795856460:D>
:fShort Date/TimeNovember 28, 2026 9:01 AM<t:1795856460:f>
:FFull Date/TimeSaturday, November 28, 2026 9:01 AM<t:1795856460:F>
:sShort Date/Time11/28/2026 9:01 AM<t:1795856460:s>
:SLong Date/Time11/28/2026 9:01:00 AM<t:1795856460:S>
:RRelative Timein 2 hours / 3 days ago<t:1795856460:R>
04 / Accuracy & DST

Why Fixed Abbreviations Cause 1-Hour Errors

The most common complaint when scheduling Discord events is: "My announcement was scheduled for 8 PM, but members saw 7 PM or 9 PM!"

This error happens because people often use static acronyms like EST or PST. During Daylight Saving Time, these regions switch to EDT and PDT. If you convert against "EST" in July, you are off by exactly 1 hour.

Best Practice: Always select named IANA geographical regions like America/New_York or Europe/London. Named zones contain historical and future daylight saving schedules, eliminating drift.
05 / Bot Developers

Using Timestamps in Discord.js & Discord.py

JS / TS (Discord.js)Node.js
import { time, TimestampStyles } from 'discord.js';

const eventDate = new Date('2026-11-28T18:00:00Z');

// Using discord.js time helper:
const relative = time(eventDate, TimestampStyles.RelativeTime);
// Or standard template literal:
const epochSec = Math.floor(eventDate.getTime() / 1000);
const msg = `Event begins in <t:${epochSec}:R>!`;
Python (Discord.py)Python 3
from datetime import datetime, timezone
import discord
from discord.utils import format_dt

dt = datetime(2026, 11, 28, 18, 0, tzinfo=timezone.utc)

# Using format_dt helper:
relative_str = format_dt(dt, style='R')

# Or raw Unix integer:
epoch = int(dt.timestamp())
await ctx.send(f"Event starts <t:{epoch}:R>!")
Frequently Asked Questions

Discord Timestamp Syntax & Developer FAQ

Technical answers to regex matching, embed limitations, Discord.js and Discord.py implementation rules, and @invalid-date troubleshooting.

What is the regex pattern to match Discord timestamps?

To match Discord timestamp markdown tags in text, use the regular expression: <t:(\d+)(:[tTdDfFsSR])?>. This regex extracts both the 10-digit Unix timestamp and the optional style flag.

Why doesn't a timestamp convert inside Discord embed titles or footers?

Discord's client markdown parser only converts timestamp tags inside embed descriptions and embed field values. Embed titles and embed footers display raw characters without markdown translation. Always place dynamic timestamps inside the description or fields.

How do I format timestamps in Discord.js v14?

In Discord.js v14, use the built-in time() helper and TimestampStyles enum: time(new Date(), TimestampStyles.RelativeTime). Alternatively, compute epoch seconds directly with Math.floor(Date.now() / 1000) and format the string as <t:${epoch}:R>.

How do I format timestamps in Discord.py?

In Discord.py, import format_dt from discord.utils: discord.utils.format_dt(datetime_obj, style='R'). This automatically formats the datetime object into a compliant Discord tag.

Why does Discord display @invalid-date in chat?

Discord displays @invalid-date when the timestamp number is non-numeric, out of range, or passed as a 13-digit millisecond value instead of 10-digit seconds. Ensure your code passes integer seconds (such as 1726257000).