π
Format Time
base.format_timeBase SetUtilityFormats a date/time spark into human-readable text, ISO, a custom pattern, or Discord's native `<t:unix:style>` timestamps (t, T, d, D, f, F, R). Leave the input empty to use the current time when the flow runs.
When to use this
- βDiscord mode outputs `<t:unix:style>` β paste {{when}} into a Reply and Discord renders it live
- βUse locale mode for plain English dates; custom mode supports YYYY, MM, DD, HH, mm, ss
- βLeave timestamp empty to format the moment the flow runs
On the canvas
This is what Format Time looks like when you place it on your flow. Each field below is something you configure in the inspector panel.
πUtility
Format Time
base.format_timeinput
{{timestamp}} or leave empty for now
moderequired
selectβ¦
discordStyle
selectβ¦
locale
en-US
dateStyle
selectβ¦
timeStyle
selectβ¦
pattern
YYYY-MM-DD HH:mm
timezone
America/New_York
asrequired
when (becomes a Spark!)
Config fields
| Field | Type | Req | What it does |
|---|---|---|---|
input{{timestamp}} or leave empty for now | text | β | Timestamp β±οΈ |
mode | select | yes | Format mode |
discordStyle | select | β | Discord style |
localeen-US | text | β | Locale |
dateStyle | select | β | Date style |
timeStyle | select | β | Time style |
patternYYYY-MM-DD HH:mm | text | β | Custom pattern |
timezoneAmerica/New_York | text | β | Timezone (optional) |
aswhen (becomes a Spark!) | text | yes | Name the result β¨ |
Output ports
outputMoves on with the formatted time available as a Spark
π
In TypeScript, this would beβ¦
Not something you need to write β just a look at what Kitcord does for you.
TypeScript
const unix = Math.floor(Date.parse(isoOrMs) / 1000);
// Discord: <t:${unix}:R> (relative β "in 2 hours")
// Locale: new Intl.DateTimeFormat("en-US", { dateStyle: "medium", timeStyle: "short" }).format(date)More Utility pieces