K
Docs
API ReferencePiecesFormat Time
🕐

Format Time

base.format_timeBase SetUtility

Formats 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.

🕐
Format Time
base.format_time
Utility
input
{{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

FieldTypeReqWhat it does
input
{{timestamp}} or leave empty for now
textTimestamp ⏱️
modeselectyesFormat mode
discordStyleselectDiscord style
locale
en-US
textLocale
dateStyleselectDate style
timeStyleselectTime style
pattern
YYYY-MM-DD HH:mm
textCustom pattern
timezone
America/New_York
textTimezone (optional)
as
when (becomes a Spark!)
textyesName 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)